Skip to content

Commit

Permalink
[pickers] Consider TDate in ToolbarComponent types (#27035)
Browse files Browse the repository at this point in the history
  • Loading branch information
michal-perlakowski authored Jun 30, 2021
1 parent a89b3e3 commit ae5c8fe
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/material-ui-lab/src/DatePicker/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface BaseDatePickerProps<TDate>
* Component that will replace default toolbar renderer.
* @default DatePickerToolbar
*/
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps>;
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps<TDate | null>>;
/**
* Array of views to show.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui-lab/src/DateTimePicker/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ export interface BaseDateTimePickerProps<TDate>
* Component that will replace default toolbar renderer.
* @default DateTimePickerToolbar
*/
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps>;
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps<TDate | null>>;
/**
* Date format, that is displaying in toolbar.
*/
Expand Down
2 changes: 1 addition & 1 deletion packages/material-ui-lab/src/TimePicker/shared.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface BaseTimePickerProps<TDate>
* Component that will replace default toolbar renderer.
* @default TimePickerToolbar
*/
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps>;
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps<TDate | null>>;
/**
* Array of views to show.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export interface BasePickerProps<TInputValue, TDateValue> {
/**
* Component that will replace default toolbar renderer.
*/
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps>;
ToolbarComponent?: React.JSXElementConstructor<ToolbarComponentProps<TDateValue>>;
/**
* Date format, that is displaying in toolbar.
*/
Expand Down

0 comments on commit ae5c8fe

Please sign in to comment.