import { StyleSheet, View } from 'react-native' import { daySize } from './dateUtils' import { memo } from 'react' import { sharedStyles } from '../shared/styles' function DayRange({ leftCrop, rightCrop, inRange, selectColor, }: { leftCrop: boolean rightCrop: boolean inRange: boolean selectColor: string }) { const bothWays = inRange && leftCrop && rightCrop const isCrop = inRange && (leftCrop || rightCrop) && !(leftCrop && rightCrop) if (inRange || isCrop) { return ( {isCrop && ( <> )} ) } return null } const styles = StyleSheet.create({ leftRadius: { borderBottomLeftRadius: daySize / 2, borderTopLeftRadius: daySize / 2, }, rightRadius: { borderBottomRightRadius: daySize / 2, borderTopRightRadius: daySize / 2, }, rangeRootBoth: { borderRadius: daySize / 2, }, }) export default memo(DayRange)