a challenge has arisen here, I'm using React Native
and I need to pass props to RectButton
, does anyone know how?
Because it is not a standard React Native feature, it is imported from react-native-gesture-handler
, so I don't have access to it through styled-components
, I would like something 'like this':
export const CheckBoxInput = styled(RectButton)<CheckBoxInputProps>` border: 1px solid ${h4_app_color}; width: 20px; height: 20px; border-radius: 20px; ${(props) => props.filled ? css` background-color: ${h4_app_color}; ` : css` background-color: white; `}`;
My props are like this:
interface CheckBoxInputProps { filled?: boolean;}