import type { ImageStyle, StyleProp } from 'react-native'; import { useColors } from '../../hook'; import { IconButton } from './IconButton'; export type CheckButtonProps = { checked: boolean; disable?: boolean; onClicked?: () => void; style?: StyleProp; }; export function CheckButton(props: CheckButtonProps) { const { checked, disable = false, onClicked, style } = props; const { getColor } = useColors(); const name = (checked?: boolean) => { return checked !== false ? 'checked_rectangle' : 'unchecked_rectangle'; }; const color = (disable?: boolean) => { return disable !== true ? getColor('enable') : getColor('disable2'); }; return ( { if (disable !== true) { onClicked?.(); } }} /> ); }