Skip to content

Instantly share code, notes, and snippets.

@itsramiel
Created June 20, 2022 10:27
Show Gist options
  • Save itsramiel/047440ae1d61df5cabdcd193385bc0c7 to your computer and use it in GitHub Desktop.
Save itsramiel/047440ae1d61df5cabdcd193385bc0c7 to your computer and use it in GitHub Desktop.
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