mirror of
https://github.com/Stef-00012/Zipline-Android-App.git
synced 2025-05-11 10:25:59 +02:00
26 lines
No EOL
819 B
TypeScript
26 lines
No EOL
819 B
TypeScript
import { MaterialIcons } from "@expo/vector-icons";
|
|
import { TouchableOpacity, View } from "react-native";
|
|
import { styles } from "@/styles/components/checkbox";
|
|
|
|
interface Props {
|
|
value: boolean;
|
|
onValueChange: () => void
|
|
}
|
|
|
|
export default function CheckBox({ value, onValueChange }: Props) {
|
|
return (
|
|
<TouchableOpacity onPress={onValueChange} style={styles.checkboxContainer}>
|
|
<View style={{
|
|
...styles.checkbox,
|
|
borderColor: value ? "#323ea8" : "#222c47",
|
|
backgroundColor: value ? '#323ea8' : 'transparent'
|
|
}}>
|
|
{value && <MaterialIcons
|
|
name="check"
|
|
size={16}
|
|
color='white'
|
|
/>}
|
|
</View>
|
|
</TouchableOpacity>
|
|
);
|
|
} |