-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pickers] Use the new ownerState
object on the <PickersTextField />
component
#15863
[pickers] Use the new ownerState
object on the <PickersTextField />
component
#15863
Conversation
Deploy preview: https://deploy-preview-15863--material-ui-x.netlify.app/ |
3618e05
to
306c64b
Compare
5779d6f
to
fa018dc
Compare
ownerState
object on the PickersTextField
component
@@ -46,7 +46,7 @@ export interface PickersArrowSwitcherOwnerState extends PickerOwnerState { | |||
/** | |||
* If `true`, this button should be hidden. | |||
*/ | |||
hidden: boolean; | |||
isButtonHidden: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I renamed that one to be consistent on the prefixing
fa018dc
to
8bf4c02
Compare
53de30c
to
b7d5af0
Compare
ownerState
object on the PickersTextField
componentownerState
object on the <PickersTextField />
component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only nits again! LGTM otherwise! 💪🏻
packages/x-date-pickers/src/PickersTextField/PickersFilledInput/PickersFilledInput.tsx
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/PickersTextField/PickersFilledInput/PickersFilledInput.tsx
Outdated
Show resolved
Hide resolved
packages/x-date-pickers/src/PickersTextField/PickersFilledInput/PickersFilledInput.tsx
Outdated
Show resolved
Hide resolved
|
||
const round = (value: number) => Math.round(value * 1e5) / 1e5; | ||
|
||
export const PickersInputBaseRoot = styled('div', { | ||
name: 'MuiPickersInputBase', | ||
slot: 'Root', | ||
overridesResolver: (props, styles) => styles.root, | ||
})<{ ownerState: OwnerStateType }>(({ theme }) => ({ | ||
})<{ ownerState: PickersTextFieldOwnerState }>(({ theme }) => ({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just noticed this:
Do we intentionally use "TextField" here to show the meaning of the overall concept and "input" elsewhere to target the actual element?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Text Field is the component that contains the label, the error message etc... AND the input.
It's not a nomenclature I love tbh, but I tried to stay close from the core logic here to smoothen the migration 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! 🎉
Leaving some nitpicks. 🙈
Part of #14475
I forgot this one 😬