[Dialog] Fix typescript support for custom breakpoints #26330
Labels
bug 🐛
Something doesn't work
component: dialog
This is the name of the generic UI component, not the React module!
ready to take
Help wanted. Guidance available. There is a high chance the change will be accepted
Dialog.d.ts typings has hardcoded breakpoints in its definition instead using
Breakpoint
fromcreateBreakpoints
.Current Behavior 😯
This makes typescript fail when you add custom breakpoints and want to use it in
maxWidth
prop.Expected Behavior 🤔
To be able to add custom breakpoints in
maxWidth
Steps to Reproduce 🕹
https://codesandbox.io/s/happy-volhard-0u9o8?file=/src/Demo.tsx
Context 🔦
Just created a similar fix for Container (#26328), but when I was trying to fix this one in a new PR, I saw that the PropTypes of the Dialog were generated automatically via
yarn proptypes
.Tried the change in the Dialog.d.ts and run the command but the PropTypes were not properly generated (with the
/* @typescript-to-proptypes-ignore */
).Your Environment 🌎
codeshare :D
The text was updated successfully, but these errors were encountered: