UNPKG

zy-react-native-calendars

Version:
44 lines (41 loc) 1.15 kB
import {StyleSheet, Platform} from 'react-native'; import * as defaultStyle from '../../../style'; const STYLESHEET_ID = 'stylesheet.day.single'; export default function styleConstructor(theme={}) { const appStyle = {...defaultStyle, ...theme}; return StyleSheet.create({ base: { width: 32, height: 32, alignItems: 'center' }, text: { marginTop: Platform.OS === 'android' ? 4 : 6, fontSize: appStyle.textDayFontSize, fontFamily: appStyle.textDayFontFamily, fontWeight: appStyle.textDayFontWeight, color: appStyle.dayTextColor, backgroundColor: 'rgba(255, 255, 255, 0)' }, alignedText: { marginTop: Platform.OS === 'android' ? 4 : 6 }, selected: { backgroundColor: appStyle.selectedDayBackgroundColor, borderRadius: 16 }, today: { backgroundColor: appStyle.todayBackgroundColor }, todayText: { color: appStyle.todayTextColor }, selectedText: { color: appStyle.selectedDayTextColor }, disabledText: { color: appStyle.textDisabledColor }, ...(theme[STYLESHEET_ID] || {}) }); }