Something went wrong. Try again.
Mirror — see github.com/blacksky-algorithms/blacksky.community
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061import {View} from 'react-native'import {Trans} from '@lingui/react/macro'
import {atoms as a, useTheme} from '#/alf'import {Button, type ButtonProps} from '#/components/Button'import {Text} from '#/components/Typography'
export function EditTextButton({ children, style, onPress, ...props}: ButtonProps & {value: string}) { const t = useTheme()
return ( <View style={[a.relative]}> <Button color="secondary" style={[ a.flex_1, a.justify_between, a.rounded_full, a.border, t.atoms.bg, t.atoms.border_contrast_low, style, ]} onPress={onPress} {...props}> {context => ( <View style={[ a.flex_1, a.flex_row, a.align_center, a.justify_between, a.pl_lg, a.pr_sm, a.py_sm, a.gap_sm, ]}> {typeof children === 'function' ? children(context) : children} <View style={[ a.rounded_full, t.atoms.bg_contrast_50, {paddingHorizontal: 10, paddingVertical: 8}, ]}> <Text style={[a.text_xs, a.font_medium, t.atoms.text_contrast_high]}> <Trans>Edit</Trans> </Text> </View> </View> )} </Button> </View> )}