import * as React from 'react'; import { ImageStyle, TextStyle, ViewStyle } from 'react-native'; import styled from 'styled-components/native'; import { useTheme } from 'styled-components/native'; const Wrapper = styled.TouchableOpacity` height: 40px; border-radius: 20px; flex-direction: row; border: 1px solid white; padding-horizontal: 20px; align-items: center; justify-content: center; `; const DisabledWrapper = styled.View` height: 40px; border-radius: 20px; flex-direction: row; border: 1px solid white; padding-horizontal: 20px; align-items: center; justify-content: center; `; const Icon = styled.Image` width: 22px; height: 22px; `; const Title = styled.Text` font-size: 16px; margin-horizontal: 7px; `; interface Props { icon?: any; title?: string; onClick?: any; height?: number; isOutline?: boolean; disabled?: boolean; color?: string; bgColor?: string; borderColor?: string; textColor?: string; iconColor?: string; style?: ViewStyle; iconStyle?: ImageStyle; textStyle?: TextStyle; disabledColor?: string; iconCover?: boolean; urlIcon?: any; cover?: any; } const OIconButton = (props: Props) => { const theme = useTheme(); return ( <> {!props.disabled ? ( {props.icon ? ( ) : null} {props.title ? ( {props.title} ) : null} ) : ( {props.icon ? ( ) : null} {props.title ? ( {props.title} ) : null} )} ); }; OIconButton.defaultProps = {}; export default OIconButton;