File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,4 +24,4 @@ export default function App() {
2424 )
2525 }
2626
27- }
27+ }
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { StyleSheet , View , Text } from 'react-native' ;
3+ import { globalStyles } from './styles/global' ;
34
45export default function About ( ) {
56 return (
6- < View style = { styles . container } >
7+ < View style = { globalStyles . container } >
78 < Text > About Screen</ Text >
89 </ View >
910 ) ;
10- }
11-
12- const styles = StyleSheet . create ( {
13- container : {
14- padding : 24 ,
15- } ,
16- } ) ;
11+ }
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { StyleSheet , View , Text } from 'react-native' ;
3+ import { globalStyles } from '../styles/global' ;
34
45export default function Home ( ) {
56 return (
6- < View style = { styles . container } >
7- < Text style = { styles . titleText } > Home Screen</ Text >
7+ < View style = { globalStyles . container } >
8+ < Text style = { globalStyles . titleText } > Home Screen</ Text >
89 </ View >
910 ) ;
10- }
11-
12- const styles = StyleSheet . create ( {
13- container : {
14- padding : 24 ,
15- } ,
16- titleText : {
17- fontFamily : 'nunito-bold' ,
18- fontSize : 18 ,
19- }
20- } ) ;
11+ }
Original file line number Diff line number Diff line change 11import React from 'react' ;
22import { StyleSheet , View , Text } from 'react-native' ;
3+ import { globalStyles } from '../styles/global' ;
34
45export default function ReviewDetails ( ) {
56 return (
6- < View style = { styles . container } >
7+ < View style = { globalStyles . container } >
78 < Text > ReviewDetails Screen</ Text >
89 </ View >
910 ) ;
10- }
11-
12- const styles = StyleSheet . create ( {
13- container : {
14- padding : 24 ,
15- } ,
16- } ) ;
11+ }
Original file line number Diff line number Diff line change 1+ import { StyleSheet } from 'react-native' ;
2+
3+ export const globalStyles = StyleSheet . create ( {
4+ titleText : {
5+ fontSize : 18 ,
6+ fontWeight : 'bold' ,
7+ color : '#333' ,
8+ } ,
9+ paragraph : {
10+ marginVertical : 8 ,
11+ lineHeight : 20 ,
12+ } ,
13+ container : {
14+ flex : 1 ,
15+ padding : 20 ,
16+ } ,
17+ } ) ;
You can’t perform that action at this time.
0 commit comments