MCPcopy Create free account
hub / github.com/OneBitCodeBlog/onebitlife / Notification

Function Notification

src/Components/HabitPage/Notification/index.jsx:12–33  ·  view source on GitHub ↗
({
  notificationToggle,
  setNotificationToggle,
})

Source from the content-addressed store, hash-verified

10import { Switch } from "react-native-gesture-handler";
11
12export 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
35const styles = StyleSheet.create({
36 container: {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected