-
-
Notifications
You must be signed in to change notification settings - Fork 703
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(types): deprecations and updated type names (#2138)
* Rename RootProvider → ContextProviders * Remove RootContextProps, use ContextProvidersProps * Update jsdoc * Rename Root → Calendar * Calendar: rename internal Month component * Rename Month → MonthGrid * CustomComponents: define type using exports * Rename Caption → MonthCaption * HeadRow → WeekdaysRow, deprecate Head component * MonthCaption chore: update imports * Rename Row → WeekRow * Rename WeekNumber → WeekNumberRowHeader * Rename DayPickerProps to shorten names * DaySelectionMode → Mode * Events types * Lint files, remove useInput * Lint file * Add deprecated * Update Labels types * New: labelWeekNumberHeader * Update deprecation messages * Rename test file * Fix labelDay options typing * Export deprecated DayPickerDefaultProps * Formatters: always return strings * Fix formatters test * Update selectors for next/prev buttons * Update snapshot * Fix tests for next/prev labels * Fix website build * Add upgrading guide * Update for docs * Update pnpm-lock * Fix internal links * Fix internal links
- Loading branch information
Showing
99 changed files
with
773 additions
and
839 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,14 +1,19 @@ | ||
import { useDayPicker } from "../contexts/DayPicker"; | ||
|
||
import { HeadRow } from "./HeadRow"; | ||
import { WeekdaysRow as DefaultWeekdaysRow } from "./WeekdaysRow"; | ||
|
||
/** Render the table head. */ | ||
/** | ||
* Render the table head. | ||
* | ||
* @deprecated This component should be removed in the next major version. Use | ||
* only `WeekdaysRow`. | ||
*/ | ||
export function Head(): JSX.Element { | ||
const { classNames, styles, components } = useDayPicker(); | ||
const HeadRowComponent = components?.HeadRow ?? HeadRow; | ||
const WeekdaysRow = components?.WeekdaysRow ?? DefaultWeekdaysRow; | ||
return ( | ||
<thead style={styles.head} className={classNames.head}> | ||
<HeadRowComponent /> | ||
<WeekdaysRow /> | ||
</thead> | ||
); | ||
} |
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
Oops, something went wrong.