1
1
import React , { useCallback , useState , useMemo } from "react" ;
2
2
import styled , { useTheme } from "styled-components/native" ;
3
3
4
- import { ActivityIndicator , TouchableHighlight , TouchableHighlightProps , View } from "react-native" ;
4
+ import { ActivityIndicator , TouchableOpacity , TouchableOpacityProps , View } from "react-native" ;
5
5
import { buttonSizeStyle , getButtonColorStyle } from "../../cta/Button/getButtonStyle" ;
6
6
import { ctaIconSize , ctaTextType } from "../../cta/getCtaStyle" ;
7
7
import Text from "../../Text" ;
8
8
import { Icon as IconComponent } from "../../Icon" ;
9
9
import baseStyled , { BaseStyledProps } from "../../styled" ;
10
10
11
- export type ButtonProps = TouchableHighlightProps &
11
+ export type ButtonProps = TouchableOpacityProps &
12
12
BaseStyledProps & {
13
13
Icon ?: React . ComponentType < { size : number ; color : string } > | null ;
14
14
iconName ?: string ;
@@ -31,7 +31,7 @@ const IconContainer = styled.View<{
31
31
p . iconButton ? "" : p . iconPosition === "left" ? `margin-right: 10px;` : `margin-left: 10px;` }
32
32
` ;
33
33
34
- export const Base = baseStyled ( TouchableHighlight ) . attrs < ButtonProps > ( ( p ) => ( {
34
+ export const Base = baseStyled ( TouchableOpacity ) . attrs < ButtonProps > ( ( p ) => ( {
35
35
...getButtonColorStyle ( p . theme . colors , p ) . button ,
36
36
// Avoid conflict with styled-system's size property by nulling size and renaming it
37
37
size : undefined ,
0 commit comments