Skip to content

Commit

Permalink
Improve borderRadius support (#22)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarceloPrado authored Mar 2, 2024
1 parent 2712948 commit 4fe1276
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/spicy-starfishes-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@marceloterreiro/flash-calendar": patch
---

Remove `borderRadius` type from `itemDay.container`, given it gets overwritten by the base component.
4 changes: 2 additions & 2 deletions packages/flash-calendar/src/components/CalendarItemDay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const styles = StyleSheet.create({
export type DayState = "idle" | "active" | "today" | "disabled";

interface DayTheme {
container: ViewStyle;
container: Omit<ViewStyle, "borderRadius">;
content: TextStyle;
}
type CalendarItemDayTheme = Record<
Expand All @@ -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,
Expand Down

0 comments on commit 4fe1276

Please sign in to comment.