Skip to content

Commit 6c845ee

Browse files
committed
Better example is here
1 parent 9d9dbc6 commit 6c845ee

5 files changed

Lines changed: 21 additions & 11 deletions

File tree

example/App.tsx

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,40 +13,50 @@ import SwitchButton from "@freakycoder/react-native-switch-button";
1313
const App = () => {
1414
return (
1515
<SafeAreaView style={{ flex: 1, margin: 32 }}>
16-
<Text>App Setting</Text>
16+
<Text style={{ fontSize: 32, fontWeight: "bold", color: "#757575" }}>
17+
App Setting
18+
</Text>
19+
<Text style={{ color: "#bababa", marginTop: 12 }}>
20+
Fundamental app settings to configure
21+
</Text>
1722
<View
1823
style={{
1924
flexDirection: "row",
2025
width: "100%",
21-
justifyContent: "space-evenly",
26+
marginTop: 32,
27+
justifyContent: "space-between",
2228
}}
2329
>
2430
<SwitchButton
2531
inactiveImageSource={require("./assets/notification.png")}
2632
activeImageSource={require("./assets/notification-3.png")}
2733
text="Notification"
2834
textStyle={{
29-
color: "#757575",
35+
color: "#f1bb7b",
3036
fontWeight: "600",
3137
}}
3238
onPress={(isActive: boolean) => console.log(isActive)}
3339
/>
3440
<SwitchButton
35-
inactiveImageSource={require("./assets/notification.png")}
36-
activeImageSource={require("./assets/notification-3.png")}
37-
text="Notification"
41+
inactiveImageSource={require("./assets/fingerprint.png")}
42+
activeImageSource={require("./assets/fingerprint.png")}
43+
mainColor="#2196f2"
44+
tintColor="#2196f2"
45+
text="Security"
3846
textStyle={{
39-
color: "#757575",
47+
color: "#2196f2",
4048
fontWeight: "600",
4149
}}
4250
onPress={(isActive: boolean) => console.log(isActive)}
4351
/>
4452
<SwitchButton
45-
inactiveImageSource={require("./assets/notification.png")}
46-
activeImageSource={require("./assets/notification-3.png")}
47-
text="Notification"
53+
inactiveImageSource={require("./assets/location-pin.png")}
54+
mainColor="#fc583b"
55+
tintColor="#fc583b"
56+
activeImageSource={require("./assets/location-pin-2.png")}
57+
text="Location"
4858
textStyle={{
49-
color: "#757575",
59+
color: "#fc583b",
5060
fontWeight: "600",
5161
}}
5262
onPress={(isActive: boolean) => console.log(isActive)}

example/assets/fingerprint.png

5.87 KB
Loading

example/assets/location-pin-2.png

11.8 KB
Loading

example/assets/location-pin.png

16.5 KB
Loading

example/assets/notification-2.png

-3.53 KB
Binary file not shown.

0 commit comments

Comments
 (0)