Skip to content

Commit

Permalink
[datetime2] feat: export DayPickerProps type (#6434)
Browse files Browse the repository at this point in the history
  • Loading branch information
adidahiya authored Oct 6, 2023
1 parent a2fed89 commit 69b0c42
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/datetime2/src/common/reactDayPickerProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

import type { DayPickerRangeProps, DayPickerSingleProps } from "react-day-picker";
import type { DayPickerBase, DayPickerRangeProps, DayPickerSingleProps } from "react-day-picker";

type ReactDayPickerOmittedProps =
| "captionLayout"
Expand All @@ -32,6 +32,12 @@ type ReactDayPickerOmittedProps =
| "toMonth"
| "toYear";

/**
* react-day-picker v8.x options which may be customized / overriden on
* `DatePicker3`, `DateInput3`, `DateRangePicker3`, and `DateRangeInput3` via the `dayPickerProps` prop.
*/
export type DayPickerProps = Omit<DayPickerBase, ReactDayPickerOmittedProps>;

export interface ReactDayPickerRangeProps {
/**
* Props to pass to react-day-picker's day range picker. See API documentation
Expand Down
1 change: 1 addition & 0 deletions packages/datetime2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/

export type { DayPickerProps } from "./common/reactDayPickerProps";
export { DatePicker3, DatePicker3Props } from "./components/date-picker3/datePicker3";
export { DateInput3, DateInput3Props } from "./components/date-input3/dateInput3";
export { DateRangeInput3, DateRangeInput3Props } from "./components/date-range-input3/dateRangeInput3";
Expand Down

1 comment on commit 69b0c42

@adidahiya
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[datetime2] feat: export DayPickerProps type (#6434)

Build artifact links for this commit: documentation | landing | table | demo

This is an automated comment from the deploy-preview CircleCI job.

Please sign in to comment.