refactored text styles, not enough shared

This commit is contained in:
austinried
2021-07-08 17:56:05 +09:00
parent 3460b4014f
commit fe92c63a60
16 changed files with 358 additions and 346 deletions

14
app/styles/dimensions.ts Normal file
View File

@@ -0,0 +1,14 @@
import { StatusBar } from 'react-native'
const header = 56
const tabBar = 54
const top = () => header + (StatusBar.currentHeight || 0)
const bottom = () => tabBar
export default {
header,
tabBar,
top,
bottom,
}

7
app/styles/font.ts Normal file
View File

@@ -0,0 +1,7 @@
enum font {
regular = 'Metropolis-Regular',
semiBold = 'Metropolis-SemiBold',
bold = 'Metropolis-Bold',
}
export default font

View File

@@ -1,73 +0,0 @@
import { TextStyle } from 'react-native'
import colors from '@app/styles/colors'
export enum Font {
regular = 'Metropolis-Regular',
semiBold = 'Metropolis-SemiBold',
bold = 'Metropolis-Bold',
}
const paragraph: TextStyle = {
fontFamily: Font.regular,
fontSize: 16,
color: colors.text.primary,
}
const header: TextStyle = {
...paragraph,
fontSize: 18,
fontFamily: Font.semiBold,
}
const title: TextStyle = {
...paragraph,
fontSize: 24,
fontFamily: Font.bold,
}
const itemTitle: TextStyle = {
...paragraph,
fontSize: 13,
fontFamily: Font.semiBold,
}
const itemSubtitle: TextStyle = {
...paragraph,
fontSize: 12,
color: colors.text.secondary,
}
const songListTitle: TextStyle = {
...paragraph,
fontSize: 16,
fontFamily: Font.semiBold,
}
const songListSubtitle: TextStyle = {
...paragraph,
fontSize: 14,
color: colors.text.secondary,
}
const xsmall: TextStyle = {
...paragraph,
fontSize: 10,
}
const button: TextStyle = {
...paragraph,
fontSize: 15,
fontFamily: Font.bold,
}
export default {
paragraph,
header,
title,
itemTitle,
itemSubtitle,
songListTitle,
songListSubtitle,
xsmall,
button,
}