UNPKG

react-native-persian-daily-calendar

Version:

Shows daily events in persian (jalali) calendar

106 lines (103 loc) 2.22 kB
// @flow import { StyleSheet } from 'react-native' const calendarHeight = 2400 // const eventPaddingLeft = 4 const leftMargin = 50 - 1 export default function styleConstructor ( theme = {} ) { let style = { container: { flex: 1, backgroundColor: '#ffff', ...theme.container }, contentStyle: { backgroundColor: '#ffff', height: calendarHeight + 10 }, header: { paddingHorizontal: 30, height: 50, borderTopWidth: 1, borderBottomWidth: 1, borderColor: '#E6E8F0', backgroundColor: '#F5F5F6', flexDirection: 'row', justifyContent: 'space-between', alignItems: 'center', ...theme.header }, headerText: { fontSize: 16 }, arrow: { width: 15, height: 15, resizeMode: 'contain' }, event: { position: 'absolute', backgroundColor: '#F0F4FF', opacity: 0.8, borderColor: '#DDE5FD', borderWidth: 1, borderRadius: 5, paddingLeft: 10, paddingRight: 10, minHeight: 25, flex: 1, paddingTop: 5, paddingBottom: 0, flexDirection: 'column', alignItems: 'flex-end', overflow: 'hidden', textAlign: "center", ...theme.event }, eventTitle: { color: '#615B73', fontWeight: '600', minHeight: 15, ...theme.eventTitle }, eventSummary: { color: '#615B73', fontSize: 12, flexWrap: 'wrap', ...theme.eventSummary }, eventTimes: { marginTop: 3, fontSize: 10, fontWeight: 'bold', color: '#615B73', flexWrap: 'wrap', ...theme.eventTimes }, line: { height: 1, position: 'absolute', left: leftMargin, backgroundColor: 'rgb(216,216,216)', ...theme.line }, lineNow: { height: 1, position: 'absolute', left: leftMargin, backgroundColor: 'red', ...theme.line }, timeLabel: { position: 'absolute', left: 15, color: 'rgb(170,170,170)', fontSize: 10, fontFamily: 'Helvetica Neue', fontWeight: '500', ...theme.timeLabel } } return StyleSheet.create(style) }