Skip to content
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

[InputUnstyled] Define ownerState and slot props' types #32491

Merged
merged 4 commits into from
May 12, 2022

Conversation

michaldudak
Copy link
Member

@michaldudak michaldudak commented Apr 28, 2022

Explicitly defined type of InputUnstyled's ownerState and inner slots' props.

Fixes #32632

@michaldudak michaldudak requested a review from a team April 28, 2022 11:59
@michaldudak michaldudak added component: text field This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base typescript labels Apr 28, 2022
@mui-bot
Copy link

mui-bot commented Apr 28, 2022

Details of bundle changes

Generated by 🚫 dangerJS against 4586cbb

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

Looks good overall, could we add a *.spec.ts for the added types? Most common use-case in my opinion would be using the ownerState itself for styling purposes.

@michaldudak
Copy link
Member Author

Sure, added a test file with customized slot components.

@ZeeshanTamboli
Copy link
Member

@michaldudak I have linked #32632 issue in the PR's description. It will be fixed by your type changes.

Confirmed it with the following preview base package having the latest commit 4586cbb of this PR: https://codesandbox.io/s/mui-material-ui-forked-315rvr?file=/src/App.tsx

@michaldudak
Copy link
Member Author

Thanks, @ZeeshanTamboli!

@michaldudak michaldudak merged commit b33d38f into mui:master May 12, 2022
@michaldudak michaldudak deleted the input-ownerstate-type branch May 12, 2022 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module! package: base-ui Specific to @mui/base typescript
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[InputUnstyled] ownerState is a required field for componentsProps and is appended to a DOM element
4 participants