import { type FC } from 'react'; import { View, TouchableOpacity, StyleSheet } from 'react-native'; import { moderateScale } from 'react-native-size-matters'; import IconSVG from '../../assets/svgs'; import Typography from '../../components/TTypography/TTypography'; import { defaultScale } from '../../utils/Common'; import { TypographyVariant } from '../../components/TTypography/TTypographyEnum'; interface CheckBoxProps { label?: string; checked: boolean; onPress?: () => void; disable?: boolean; containerStyle?: object; fontWeight?: any; } const TCheckBox: FC = ({ label, checked, onPress, disable = false, containerStyle, fontWeight, }): any => { const stylesWithProp = styles({ disable }); return ( { } : onPress} activeOpacity={1} > {checked ? ( ) : ( )} ); }; export default TCheckBox; const styles = (props: { disable: boolean }) => StyleSheet.create({ container: { flexDirection: 'row', alignItems: 'center', marginTop: 5, marginBottom: 5, opacity: props.disable ? 0.5 : 1, }, checkboxLabel: { fontSize: moderateScale(16, defaultScale), marginHorizontal: moderateScale(5, defaultScale), }, });