-
Notifications
You must be signed in to change notification settings - Fork 322
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
fix(SplitButton storybook): - fix stories that use wrong prop #2138
fix(SplitButton storybook): - fix stories that use wrong prop #2138
Conversation
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.
Awesome! Had a suggestion to make stories usable for users
@@ -187,7 +188,7 @@ export const SplitButtonAsThePrimaryAction = { | |||
render: () => ( | |||
<SplitButton | |||
children="Use template" | |||
secondaryPositions={SplitButton.secondaryPositions.BOTTOM_END} | |||
secondaryDialogPosition={DialogPosition.BOTTOM_START} |
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.
You can use the secondaryDialogPosition from the SplitButton's static values. If I'm not wrong, we do not export the DialogPosition, so we want to show stories that users can just copy and use
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 issue is that the secondaryDialogPositions from the static values is of type SplitButtonSecondaryContentPosition and the secondaryDialogPosition is of type DialogPosition
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.
We resolved the issue by adding SplitButtonSecondaryContentPosition type to secondaryDialogPosition, and will remove the DialogPosition type in the next major release
@@ -211,7 +212,7 @@ export const SecondarySplitButton = { | |||
<SplitButton | |||
children="Export to CSV" | |||
kind={SplitButton.kinds.SECONDARY} | |||
secondaryPositions={SplitButton.secondaryPositions.BOTTOM_MIDDLE} | |||
secondaryDialogPosition={DialogPosition.BOTTOM_START} |
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.
Same
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.
Awesome!!! 🚀
https://monday.monday.com/boards/3532714909/views/113186840/pulses/6495343163