-
Notifications
You must be signed in to change notification settings - Fork 3k
/
style.ts
73 lines (71 loc) Β· 1.84 KB
/
style.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
import {StyleSheet, Platform} from 'react-native';
import * as defaultStyle from '../../style';
import {Theme} from '../../types';
import constants from '../../commons/constants';
export default function (theme: Theme = {}) {
const appStyle = {...defaultStyle, ...theme};
const rtlStyle = constants.isRTL ? {transform: [{scaleX: -1}]} : undefined;
return StyleSheet.create({
header: {
flexDirection: 'row',
justifyContent: 'space-between',
paddingLeft: 10,
paddingRight: 10,
marginTop: 6,
alignItems: 'center',
},
partialHeader: {
paddingHorizontal: 15
},
headerContainer: {
flexDirection: 'row'
},
monthText: {
fontSize: appStyle.textMonthFontSize,
fontFamily: appStyle.textMonthFontFamily,
fontWeight: appStyle.textMonthFontWeight,
color: appStyle.monthTextColor,
margin: 10
},
arrow: {
padding: 10,
...appStyle.arrowStyle
},
arrowImage: {
...rtlStyle,
tintColor: appStyle.arrowColor,
...Platform.select({
web: {
width: appStyle.arrowWidth,
height: appStyle.arrowHeight
}
})
},
disabledArrowImage: {
...rtlStyle,
tintColor: appStyle.disabledArrowColor
},
week: {
marginTop: 7,
flexDirection: 'row',
justifyContent: 'space-around',
},
partialWeek: {
paddingRight: 0
},
dayHeader: {
marginTop: 2,
marginBottom: 7,
width: 32,
textAlign: 'center',
fontSize: appStyle.textDayHeaderFontSize,
fontFamily: appStyle.textDayHeaderFontFamily,
fontWeight: appStyle.textDayHeaderFontWeight,
color: appStyle.textSectionTitleColor
},
disabledDayHeader: {
color: appStyle.textSectionTitleDisabledColor
},
...(theme['stylesheet.calendar.header'] || {})
});
}