forked from hewad-mubariz/reactnative-50-days
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
37 lines (33 loc) · 1013 Bytes
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import { StyleSheet, Text, View } from "react-native";
import Button from "./src/components/Button";
import { useState } from "react";
import ButtonGradient from "./src/components/ButtonGradient";
export default function App() {
const [loadingGradeint, setLoadingGradient] = useState(false);
const [loadingPrimary, setLoadingPrimay] = useState(false);
const [loadingPurple, setLoadingPurlple] = useState(false);
return (
<View style={styles.container}>
<ButtonGradient
onPress={() => setLoadingGradient(!loadingGradeint)}
loading={loadingGradeint}
/>
<Button
loading={loadingPurple}
onPress={() => setLoadingPurlple(!loadingPurple)}
/>
<Button
borderColor="rgba(0, 123, 255,0.8)"
loading={loadingPrimary}
onPress={() => setLoadingPrimay(!loadingPrimary)}
/>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: "center",
alignItems: "center",
},
});