import { Platform, StyleSheet } from 'react-native'; import * as defaultStyle from '../style'; import { Theme } from '../types'; export default function getStyle(theme: Theme = {}) { const appStyle = { ...defaultStyle, ...theme }; return StyleSheet.create({ flatListContainer: { flex: Platform.OS === 'web' ? 1 : undefined, }, container: { backgroundColor: appStyle.calendarBackground, }, placeholder: { backgroundColor: appStyle.calendarBackground, alignItems: 'center', justifyContent: 'center', }, placeholderText: { fontSize: 20, fontWeight: '200', color: appStyle.dayTextColor, }, calendar: {}, staticHeader: { position: 'absolute', left: 0, right: 0, top: 0, backgroundColor: appStyle.calendarBackground, paddingHorizontal: 15, }, // @ts-ignore ...(theme['stylesheet.calendar-list.main'] || {}), }); }