Skip to content

Instantly share code, notes, and snippets.

@sahilrajput03
Created August 8, 2020 15:59
Show Gist options
  • Save sahilrajput03/98162a06f414e85cd549a15a97384651 to your computer and use it in GitHub Desktop.
Save sahilrajput03/98162a06f414e85cd549a15a97384651 to your computer and use it in GitHub Desktop.
Theme.js
const theme = {
colors: {
textPrimary: '#24292e',
textSecondary: '#297',
primary: '#0366d6',
},
fontSizes: {
body: 14,
subheading: 16,
},
fonts: {
main: 'System',
},
fontWeights: {
normal: '400',
bold: '700',
},
paddingSahil: {
padding: 50,
fontSize: 40,
},
strikedTextLine: {
textDecorationLine: "line-through"
},
underlinedTextLine: {
textDecorationLine: "underline",
},
bold: {
fontWeight: 'bold'
},
italics: {
fontStyle: 'italic'
},
fontSize20: {
fontSize: 20,
},
// Always refactor the property names with F2, so it would change it everywhere used.
fontSize30: {
fontSize: 30,
},
centerAlignContent: {
alignContent: "center"
},
centerTextAlign: {
padding: 50,
textAlign: 'center',
},
backgroundYellow: {
backgroundColor: 'yellow',
},
roundBorder: {
borderRadius: 20
},
padding: {
padding: 2
},
margin30: {
margin: 30
},
margin60: {
margin: 60
},
};
export default theme;
// ────────────────────────────────────────────────────────
// const styleObject = StyleSheet.flatten([
// theme.bold,
// theme.backgroundYellow,
// { // Here comes custom styling. Yikess!!
// padding: 30,
// margin: 40
// }
// ])
// ────────────────────────────────────────────────────────
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment