import React from 'react'; import { CaretRight, CurrencyCircleDollar } from 'phosphor-react-native'; import { Image, StyleSheet } from 'react-native'; import type { GestureResponderEvent, ImageSourcePropType } from 'react-native'; import { TouchableOpacity } from 'react-native'; import { Box } from '../Box'; import { Text } from '../Text'; import { fonts } from '../../theme/theme'; interface Props { label: string; onPress: (event: GestureResponderEvent) => void; children?: JSX.Element; renderItem?: JSX.Element; image?: ImageSourcePropType; typeBalance?: boolean; } /** * @label Button title * @onPress Called when the touch is released, but not if cancelled * @image Receives an image source to display instead of the label * @renderItem Receives a JSX element to render into the body of button * @children Receives a JSX element to render into the bottom of button **/ export const Select = ({ label, onPress, children, renderItem, image, typeBalance, }: Props) => { return ( {typeBalance && ( )} {image ? ( ) : ( )} {renderItem} {children} ); }; const styles = StyleSheet.create({ image: { height: 30, width: '40%', resizeMode: 'contain', }, arrow: { marginRight: -4, }, iconLeft: { marginRight: 10, }, });