-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: update changelog for calendar customization
- Loading branch information
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
"@nextui-org/calendar": major | ||
--- | ||
|
||
### Changes | ||
- Added support for customizing calendar cells. | ||
- You can now use `children` to customize the content of calendar cells. | ||
- The default structure of calendar cells has been updated to improve flexibility. | ||
|
||
### Breaking Changes | ||
- **WHAT**: The following changes might affect existing implementations: | ||
1. Style class names have been renamed (e.g., `cellButton` → `cellHeader`). | ||
2. The internal structure of calendar cells has changed, which may cause existing styles to no longer apply. | ||
- **WHY**: These changes were made to provide better flexibility and support for modern styling and customization. | ||
- **HOW**: | ||
1. If you are using custom styles, update the class names to the new ones. | ||
2. Use `children` to customize the content of calendar cells. | ||
3. Refer to the example below for implementation: | ||
|
||
```jsx | ||
<Calendar> | ||
{(date) => ( | ||
<div style={{ backgroundColor: "lightblue" }}> | ||
<span>{date.day}</span> | ||
</div> | ||
)} | ||
</Calendar> | ||
``` |