Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update calendar documentation and calendar.tsx #5984

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions apps/www/content/docs/components/calendar.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,19 @@ You can use the `<Calendar>` component to build a date picker. See the [Date Pic

## Changelog

### 12-03-2024 components changed

- Changed the components to the following with the `react-day-picker` version upgrade:

```diff showLineNumbers title="calendar.tsx"
components={{
- IconLeft: ({ ...props }) => <ChevronLeft className="h-4 w-4" />,
- IconRight: ({ ...props }) => <ChevronRight className="h-4 w-4" />,
+ PreviousMonthButton: ({ ...props }) => <ChevronLeftIcon className="h-4 w-4" />,
+ NextMonthButton: ({ ...props }) => <ChevronRightIcon className="h-4 w-4" />,
}},
```

### 11-03-2024 day_outside color

- Changed the color of the `day_outside` class to the following to improve contrast:
Expand Down
4 changes: 2 additions & 2 deletions apps/www/registry/default/ui/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ function Calendar({
...classNames,
}}
components={{
IconLeft: ({ ...props }) => <ChevronLeft className="h-4 w-4" />,
IconRight: ({ ...props }) => <ChevronRight className="h-4 w-4" />,
PreviousMonthButton: ({ ...props }) => <ChevronLeftIcon className="h-4 w-4" />,
NextMonthButton: ({ ...props }) => <ChevronRightIcon className="h-4 w-4" />,
}}
{...props}
/>
Expand Down
4 changes: 2 additions & 2 deletions apps/www/registry/new-york/ui/calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ function Calendar({
...classNames,
}}
components={{
IconLeft: ({ ...props }) => <ChevronLeft className="h-4 w-4" />,
IconRight: ({ ...props }) => <ChevronRight className="h-4 w-4" />,
PreviousMonthButton: ({ ...props }) => <ChevronLeftIcon className="h-4 w-4" />,
NextMonthButton: ({ ...props }) => <ChevronRightIcon className="h-4 w-4" />,
}}
{...props}
/>
Expand Down