// CheckBox.tsx import {Pressable, View} from "react-native" import {Text} from "@/components/ignite" import {useAppTheme} from "@/contexts/ThemeContext" interface CheckBoxProps { checked: boolean onChange: (newValue: boolean) => void label?: string disabled?: boolean containerStyle?: object boxStyle?: object labelStyle?: object } const CheckBox: React.FC = ({ checked, onChange, label, disabled, containerStyle, boxStyle, labelStyle, }) => { const {theme} = useAppTheme() return ( !disabled && onChange(!checked)} disabled={disabled}> {checked && } {label ? : null} ) } const styles = { box: { alignItems: "center", borderRadius: 3, borderWidth: 2, height: 20, justifyContent: "center", marginRight: 8, width: 20, }, boxChecked: { // Colors handled dynamically with theme }, checkMark: { fontWeight: "bold", }, container: { alignItems: "center", flexDirection: "row", }, label: { fontSize: 16, }, } as const export default CheckBox