-
Notifications
You must be signed in to change notification settings - Fork 3k
/
style.ts
57 lines (55 loc) ยท 1.42 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
import {StyleSheet} from 'react-native';
import * as defaultStyle from '../style';
import platformStyles from './platform-style';
import {Theme} from '../types';
export default function styleConstructor(theme: Theme = {}) {
const appStyle = {...defaultStyle, ...theme};
const {knob, weekdays} = platformStyles(appStyle);
return StyleSheet.create({
container: {
flex: 1,
overflow: 'hidden'
},
animatedContainer: {
flex: 1
},
knob,
weekdays,
header: {
overflow: 'hidden',
justifyContent: 'flex-end',
position: 'absolute',
height: '100%',
width: '100%'
},
knobContainer: {
flex: 1,
position: 'absolute',
left: 0,
right: 0,
height: 24,
bottom: 0,
alignItems: 'center',
backgroundColor: appStyle.calendarBackground
},
dayHeader: {
width: 32,
textAlign: 'center',
fontSize: appStyle.textDayHeaderFontSize,
fontFamily: appStyle.textDayHeaderFontFamily,
fontWeight: appStyle.textDayHeaderFontWeight,
color: appStyle.textSectionTitleColor
},
reservations: {
flex: 1,
marginTop: 104,
backgroundColor: appStyle.reservationsBackgroundColor || appStyle.backgroundColor //TODO: remove 2nd in V2
},
scrollPadStyle: {
position: 'absolute',
width: '100%',
alignSelf: 'center'
},
...(theme['stylesheet.agenda.main'] || {})
});
}