({
notificationToggle,
setNotificationToggle,
})
| 10 | import { Switch } from "react-native-gesture-handler"; |
| 11 | |
| 12 | export default function Notification({ |
| 13 | notificationToggle, |
| 14 | setNotificationToggle, |
| 15 | }) { |
| 16 | const toggleSwitch = () => { |
| 17 | setNotificationToggle((previousState) => !previousState); |
| 18 | }; |
| 19 | return ( |
| 20 | <> |
| 21 | <View style={styles.container}> |
| 22 | <Text style={styles.title}>Notificação</Text> |
| 23 | <Switch |
| 24 | trackColor={{ false: "#FF0044", true: "#2DBE56" }} |
| 25 | thumbColor={"#FFFFFF"} |
| 26 | ios_backgroundColor="#3e3e3e" |
| 27 | onValueChange={toggleSwitch} |
| 28 | value={notificationToggle} |
| 29 | /> |
| 30 | </View> |
| 31 | </> |
| 32 | ); |
| 33 | } |
| 34 | |
| 35 | const styles = StyleSheet.create({ |
| 36 | container: { |
nothing calls this directly
no outgoing calls
no test coverage detected