import type {PressableProps, StyleProp, ViewStyle} from 'react-native'; import {Pressable} from 'react-native'; import {useTheme} from '@dooboo-ui/theme'; import {css} from '@emotion/native'; export default function CustomPressable( props: PressableProps & {style?: StyleProp}, ): JSX.Element { const {children, style, hitSlop} = props; const {theme} = useTheme(); return ( { if (pressed) { return [ css` background-color: ${theme.role.underlay}; `, style, ]; } return style; }} > {children} ); }