Skip to content

Commit

Permalink
[pickers] Add reference links to toolbar components (#10646)
Browse files Browse the repository at this point in the history
  • Loading branch information
michelengelen authored Oct 14, 2023
1 parent 5ae3f49 commit 8b67c90
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,16 @@ const DateRangePickerToolbarContainer = styled('div', {
display: 'flex',
});

/**
* Demos:
*
* - [DateRangePicker](https://mui.com/x/react-date-pickers/date-range-picker/)
* - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
*
* API:
*
* - [DateRangePickerToolbar API](https://mui.com/x/api/date-pickers/date-range-picker-toolbar/)
*/
const DateRangePickerToolbar = React.forwardRef(function DateRangePickerToolbar<
TDate extends unknown,
>(inProps: DateRangePickerToolbarProps<TDate>, ref: React.Ref<HTMLDivElement>) {
Expand Down
10 changes: 10 additions & 0 deletions packages/x-date-pickers/src/DatePicker/DatePickerToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,16 @@ type DatePickerToolbarComponent = (<TDate>(
props: DatePickerToolbarProps<TDate> & React.RefAttributes<HTMLDivElement>,
) => React.JSX.Element) & { propTypes?: any };

/**
* Demos:
*
* - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)
* - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
*
* API:
*
* - [DatePickerToolbar API](https://mui.com/x/api/date-pickers/date-picker-toolbar/)
*/
const DatePickerToolbar = React.forwardRef(function DatePickerToolbar<TDate>(
inProps: DatePickerToolbarProps<TDate>,
ref: React.Ref<HTMLDivElement>,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,16 @@ const DateTimePickerToolbarAmPmSelection = styled('div', {
},
}));

/**
* Demos:
*
* - [DateTimePicker](https://mui.com/x/react-date-pickers/date-time-picker/)
* - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
*
* API:
*
* - [DateTimePickerToolbar API](https://mui.com/x/api/date-pickers/date-time-picker-toolbar/)
*/
function DateTimePickerToolbar<TDate extends unknown>(inProps: DateTimePickerToolbarProps<TDate>) {
const props = useThemeProps({ props: inProps, name: 'MuiDateTimePickerToolbar' });
const {
Expand Down
10 changes: 10 additions & 0 deletions packages/x-date-pickers/src/TimePicker/TimePickerToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,16 @@ TimePickerToolbarAmPmSelection.propTypes = {
]),
} as any;

/**
* Demos:
*
* - [TimePicker](https://mui.com/x/react-date-pickers/time-picker/)
* - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)
*
* API:
*
* - [TimePickerToolbar API](https://mui.com/x/api/date-pickers/time-picker-toolbar/)
*/
function TimePickerToolbar<TDate extends unknown>(inProps: TimePickerToolbarProps<TDate>) {
const props = useThemeProps({ props: inProps, name: 'MuiTimePickerToolbar' });
const {
Expand Down

0 comments on commit 8b67c90

Please sign in to comment.