From 4fe12762f6130deb7c88e13aa957ebfa42724878 Mon Sep 17 00:00:00 2001 From: Marcelo Terreiro Prado Date: Sat, 2 Mar 2024 12:42:13 -0300 Subject: [PATCH] Improve borderRadius support (#22) --- .changeset/spicy-starfishes-punch.md | 5 +++++ packages/flash-calendar/src/components/CalendarItemDay.tsx | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/spicy-starfishes-punch.md diff --git a/.changeset/spicy-starfishes-punch.md b/.changeset/spicy-starfishes-punch.md new file mode 100644 index 0000000..b64ef58 --- /dev/null +++ b/.changeset/spicy-starfishes-punch.md @@ -0,0 +1,5 @@ +--- +"@marceloterreiro/flash-calendar": patch +--- + +Remove `borderRadius` type from `itemDay.container`, given it gets overwritten by the base component. diff --git a/packages/flash-calendar/src/components/CalendarItemDay.tsx b/packages/flash-calendar/src/components/CalendarItemDay.tsx index 378293c..d28ef55 100644 --- a/packages/flash-calendar/src/components/CalendarItemDay.tsx +++ b/packages/flash-calendar/src/components/CalendarItemDay.tsx @@ -24,7 +24,7 @@ const styles = StyleSheet.create({ export type DayState = "idle" | "active" | "today" | "disabled"; interface DayTheme { - container: ViewStyle; + container: Omit; content: TextStyle; } type CalendarItemDayTheme = Record< @@ -44,7 +44,7 @@ const buildBaseStyles = (theme: BaseTheme): CalendarItemDayTheme => { return { active: ({ isPressed, isStartOfRange, isEndOfRange }) => { - const baseStyles: DayTheme = isPressed + const baseStyles: DayTheme & { container: ViewStyle } = isPressed ? { container: { ...styles.baseContainer,