import {useCallback, useMemo} from 'react' import { type GestureResponderEvent, LayoutAnimation, type TextStyle, } from 'react-native' import {Trans, useLingui} from '@lingui/react/macro' import {HITSLOP_10} from '#/lib/constants' import {atoms as a, flatten, type TextStyleProp, useTheme} from '#/alf' import {Button} from '#/components/Button' import {Text} from '#/components/Typography' export function ShowMoreTextButton({ onPress: onPressProp, style, }: TextStyleProp & { onPress: (event: GestureResponderEvent) => void }) { const t = useTheme() const {t: l} = useLingui() const onPress = useCallback( (event: GestureResponderEvent) => { LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut) onPressProp(event) }, [onPressProp], ) const textStyle = useMemo(() => { return flatten([a.leading_snug, a.text_sm, style]) as TextStyle & { fontSize: number lineHeight: number } }, [style]) return ( ) }