Created
June 20, 2022 10:27
-
-
Save itsramiel/047440ae1d61df5cabdcd193385bc0c7 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { StatusBar } from "expo-status-bar"; | |
import { StyleSheet, Pressable, View } from "react-native"; | |
const FAB_SIZE = 70; | |
const INITIAL_COLOR = "#d00000"; | |
const FINAL_COLOR = "#4BB543"; | |
export default function App() { | |
return ( | |
<View style={styles.container}> | |
<StatusBar style="auto" /> | |
<Pressable style={styles.fabContainer}></Pressable> | |
</View> | |
); | |
} | |
const styles = StyleSheet.create({ | |
container: { | |
flex: 1, | |
backgroundColor: "#fff", | |
alignItems: "center", | |
justifyContent: "center", | |
}, | |
fabContainer: { | |
position: "absolute", | |
bottom: 30, | |
right: 30, | |
width: FAB_SIZE, | |
height: FAB_SIZE, | |
borderRadius: FAB_SIZE / 2, | |
backgroundColor: INITIAL_COLOR, | |
elevation: 5, | |
}, | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment