react-native-toggle-calendar
Version:
Horizontal as well as Grid calendar built on top of react-native-calendars
53 lines (50 loc) • 1.28 kB
JavaScript
import {StyleSheet, Platform} from 'react-native';
import * as defaultStyle from '../../style';
const STYLESHEET_ID = 'stylesheet.calendar.header';
export default function(theme={}) {
const appStyle = {...defaultStyle, ...theme};
return StyleSheet.create({
header: {
flexDirection: 'row',
justifyContent: 'space-between',
paddingLeft: 10,
paddingRight: 10,
alignItems: 'center'
},
monthText: {
fontSize: appStyle.textMonthFontSize,
fontFamily: appStyle.textMonthFontFamily,
fontWeight: appStyle.textMonthFontWeight,
color: appStyle.monthTextColor,
margin: 10
},
arrow: {
padding: 10
},
arrowImage: {
...Platform.select({
ios: {
tintColor: appStyle.arrowColor
},
android: {
tintColor: appStyle.arrowColor
}
})
},
week: {
marginTop: 7,
flexDirection: 'row',
justifyContent: 'space-around'
},
dayHeader: {
marginTop: 2,
marginBottom: 7,
width: 32,
textAlign: 'center',
fontSize: appStyle.textDayHeaderFontSize,
fontFamily: appStyle.textDayHeaderFontFamily,
color: appStyle.textSectionTitleColor
},
...(theme[STYLESHEET_ID] || {})
});
}