-
Notifications
You must be signed in to change notification settings - Fork 377
feat(drawer): use the breakpoint mods prop instead of width props #4270
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
Conversation
|
PF4 preview: https://patternfly-react-pr-4270.surge.sh |
redallen
left a comment
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 some type problems and nit but other than that LGTM
packages/react-core/src/components/Drawer/DrawerPanelContent.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/Drawer/DrawerPanelContent.tsx
Outdated
Show resolved
Hide resolved
packages/react-core/src/components/Drawer/DrawerPanelContent.tsx
Outdated
Show resolved
Hide resolved
| 66: 'width_66', | ||
| 75: 'width_75', | ||
| 100: 'width_100' | ||
| } as const; |
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.
Don't think you need as const? Maybe just make an enum?
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.
Enum key cannot be a numerical value. 😭
packages/react-core/src/components/Drawer/DrawerPanelContent.tsx
Outdated
Show resolved
Hide resolved
Signed-off-by: Boaz Shuster <boaz.shuster.github@gmail.com>
redallen
left a comment
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.
LGTM! Thanks so much @boaz0 !
| breakpointMods | ||
| .map(mod => `${mod.modifier}${mod.breakpoint ? `-on-${mod.breakpoint}` : ''}`) | ||
| .map(toCamel) | ||
| .map(mod => mod.replace(/-2xl$/gi, '_2xl')) |
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.
Thanks for fixing this! I've been forgetting to go back and do it.
nicolethoen
left a comment
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.
:)
|
Thank you so much! @nicolethoen @redallen 😸 |
What: Closes #4238
//cc @redallen