forked from thecodingmachine/react-native-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…se application styles
- Loading branch information
Matthieu Napoli
committed
Aug 13, 2018
1 parent
cc96a1d
commit 5203b8e
Showing
10 changed files
with
165 additions
and
13 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory contains the application's images. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import Fonts from './Fonts' | ||
import Metrics from './Metrics' | ||
import Colors from './Colors' | ||
|
||
const ApplicationStyles = { | ||
screen: { | ||
mainContainer: { | ||
flex: 1, | ||
backgroundColor: Colors.transparent, | ||
}, | ||
container: { | ||
flex: 1, | ||
paddingTop: Metrics.baseMargin, | ||
backgroundColor: Colors.transparent, | ||
}, | ||
section: { | ||
margin: Metrics.section, | ||
padding: Metrics.baseMargin, | ||
}, | ||
sectionText: { | ||
...Fonts.style.normal, | ||
paddingVertical: Metrics.doubleMargin, | ||
marginVertical: Metrics.smallMargin, | ||
textAlign: 'center', | ||
}, | ||
subtitle: { | ||
padding: Metrics.smallMargin, | ||
marginBottom: Metrics.smallMargin, | ||
marginHorizontal: Metrics.smallMargin, | ||
}, | ||
titleText: { | ||
...Fonts.style.h2, | ||
fontSize: 14, | ||
color: Colors.text, | ||
}, | ||
}, | ||
} | ||
|
||
export default ApplicationStyles |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
const colors = { | ||
transparent: 'rgba(0,0,0,0)', | ||
text: '#212529', | ||
primary: '#007bff', | ||
success: '#28a745', | ||
error: '#dc3545', | ||
} | ||
|
||
export default colors |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
const type = { | ||
base: 'inherit', | ||
} | ||
|
||
const size = { | ||
h1: 38, | ||
h2: 34, | ||
h3: 30, | ||
h4: 26, | ||
h5: 20, | ||
h6: 19, | ||
input: 18, | ||
regular: 17, | ||
medium: 14, | ||
small: 12, | ||
} | ||
|
||
const style = { | ||
h1: { | ||
fontFamily: type.base, | ||
fontSize: size.h1, | ||
}, | ||
h2: { | ||
fontFamily: type.base, | ||
fontSize: size.h2, | ||
}, | ||
h3: { | ||
fontFamily: type.base, | ||
fontSize: size.h3, | ||
}, | ||
h4: { | ||
fontFamily: type.base, | ||
fontSize: size.h4, | ||
}, | ||
h5: { | ||
fontFamily: type.base, | ||
fontSize: size.h5, | ||
}, | ||
h6: { | ||
fontFamily: type.base, | ||
fontSize: size.h6, | ||
}, | ||
normal: { | ||
fontFamily: type.base, | ||
fontSize: size.regular, | ||
}, | ||
} | ||
|
||
export default { | ||
type, | ||
size, | ||
style, | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/** | ||
* Images should be stored in the `App/Images` directory and referenced using variables defined here. | ||
*/ | ||
const Images = { | ||
// logo: require('../Images/logo.png'), | ||
} | ||
|
||
export default Images |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { Dimensions, Platform } from 'react-native' | ||
|
||
const { width, height } = Dimensions.get('window') | ||
|
||
const metrics = { | ||
marginHorizontal: 10, | ||
marginVertical: 10, | ||
baseMargin: 10, | ||
doubleMargin: 20, | ||
smallMargin: 5, | ||
horizontalLineHeight: 1, | ||
screenWidth: width < height ? width : height, | ||
screenHeight: width < height ? height : width, | ||
navBarHeight: Platform.OS === 'ios' ? 64 : 54, | ||
buttonRadius: 4, | ||
icons: { | ||
tiny: 15, | ||
small: 20, | ||
medium: 30, | ||
large: 45, | ||
xl: 50, | ||
}, | ||
images: { | ||
small: 20, | ||
medium: 40, | ||
large: 60, | ||
logo: 200, | ||
}, | ||
} | ||
|
||
export default metrics |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
This directory contains the base for the application styles. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Colors from './Colors' | ||
import Fonts from './Fonts' | ||
import Metrics from './Metrics' | ||
import Images from './Images' | ||
import ApplicationStyles from './ApplicationStyles' | ||
|
||
export { Colors, Fonts, Images, Metrics, ApplicationStyles } |
This file contains 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