react native style code example
Example 1: react native header style
function StackScreen() {
return (
<Stack.Navigator>
<Stack.Screen
name="Home"
component={HomeScreen}
options={{
title: 'My home',
headerStyle: {
backgroundColor: '#f4511e',
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
},
}}
/>
</Stack.Navigator>
);
}
Example 2: styles in react native
//Import
import { StyleSheet} from 'react-native';
//Add style in React native component this way
<View style={styles.container}>
</View>
//create your style this way
const styles = StyleSheet.create({
container: {
marginTop: 50,
},
});
Example 3: rngesturehandlermodule.default.direction react native
visit :- https://software-mansion.github.io/react-native-gesture-handler/docs/getting-started.html