-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[pickers] Fix
x-date-pickers-pro
theme augmentation (#6096)
* Add static pickers to augmentation types * Fix to correctly pass down `className` to static picker wrapper * Correctly apply `DateRangePickerDay` style overrides * Use classes and className in range picker components
- Loading branch information
Showing
23 changed files
with
462 additions
and
49 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
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
17 changes: 17 additions & 0 deletions
17
packages/x-date-pickers-pro/src/DateRangePicker/dateRangePickerInputClasses.ts
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,17 @@ | ||
import { generateUtilityClass, generateUtilityClasses } from '@mui/material'; | ||
|
||
export interface DateRangePickerInputClasses { | ||
/** Styles applied to the root element. */ | ||
root: string; | ||
} | ||
|
||
export type DateRangePickerInputClassKey = keyof DateRangePickerInputClasses; | ||
|
||
export function getDateRangePickerInputUtilityClass(slot: string) { | ||
return generateUtilityClass('MuiDateRangePickerInput', slot); | ||
} | ||
|
||
export const dateRangePickerInputClasses: DateRangePickerInputClasses = generateUtilityClasses( | ||
'MuiDateRangePickerInput', | ||
['root'], | ||
); |
19 changes: 19 additions & 0 deletions
19
packages/x-date-pickers-pro/src/DateRangePicker/dateRangePickerToolbarClasses.ts
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,19 @@ | ||
import { generateUtilityClass, generateUtilityClasses } from '@mui/material'; | ||
|
||
export interface DateRangePickerToolbarClasses { | ||
/** Styles applied to the root element. */ | ||
root: string; | ||
/** Styles applied to the container element. */ | ||
container: string; | ||
} | ||
|
||
export type DateRangePickerToolbarClassKey = keyof DateRangePickerToolbarClasses; | ||
|
||
export function getDateRangePickerToolbarUtilityClass(slot: string) { | ||
return generateUtilityClass('MuiDateRangePickerToolbar', slot); | ||
} | ||
|
||
export const dateRangePickerToolbarClasses: DateRangePickerToolbarClasses = generateUtilityClasses( | ||
'MuiDateRangePickerToolbar', | ||
['root', 'container'], | ||
); |
17 changes: 17 additions & 0 deletions
17
packages/x-date-pickers-pro/src/DateRangePicker/dateRangePickerViewDesktopClasses.ts
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,17 @@ | ||
import { generateUtilityClass, generateUtilityClasses } from '@mui/material'; | ||
|
||
export interface DateRangePickerViewDesktopClasses { | ||
/** Styles applied to the root element. */ | ||
root: string; | ||
/** Styles applied to the container element. */ | ||
container: string; | ||
} | ||
|
||
export type DateRangePickerViewDesktopClassKey = keyof DateRangePickerViewDesktopClasses; | ||
|
||
export function getDateRangePickerViewDesktopUtilityClass(slot: string) { | ||
return generateUtilityClass('MuiDateRangePickerViewDesktop', slot); | ||
} | ||
|
||
export const dateRangePickerViewDesktopClasses: DateRangePickerViewDesktopClasses = | ||
generateUtilityClasses('MuiDateRangePickerViewDesktop', ['root', 'container']); |
Oops, something went wrong.