Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export interface PickersInputBaseClasses {
readOnly: string;
/** State class applied to the root element if `error=true`. */
error: string;
/** State class applied to the root element if `size=small`. */
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I didn’t add @deprecated here because, in the @mui/material TextField component, inputSizeSmall is deprecated due to the presence of both input and sizeSmall (https://mui.com/material-ui/api/input-base/#input-base-classes-MuiInputBase-sizeSmall) classes. However, in PickersInputBase, the sizeSmall class isn’t available, so it’s not possible to compose the sizeSmall class in this context.

Additionally we can add sizeSmall class and then deprecate inputSizeSmall and make it consistent with @mui/material TextField. Let me know, if we want to take that approach

Copy link
Member

Choose a reason for hiding this comment

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

Thanks for providing the context.
Yes, I agree with your choice.
If there is a significant demand, we can align the API of the PickersTextField to be more in line with the new API of TextField, but I think this is a good enough first step and it fixes the open issue. 👌

inputSizeSmall: string;
/** Styles applied to the NotchedOutline element. */
notchedOutline: string;
/** Styles applied to the real hidden input element. */
Expand Down Expand Up @@ -52,6 +54,7 @@ export const pickersInputBaseClasses = generateUtilityClasses<PickersInputBaseCl
'adornedStart',
'adornedEnd',
'input',
'inputSizeSmall',
'activeBar',
],
);