-
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
docs: fix show hide event readability and make controls expanded as d… #2081
Conversation
@@ -19,14 +20,30 @@ const metaSettings = createStoryMetaSettingsDecorator({ | |||
actionPropsArray: [] // List the component's actions here | |||
}); | |||
|
|||
const showHideArgTypes = { |
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.
BTW have you tried using the enumPropNamesArray
?
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.
yes, it is not doing anything that helps with the readability :(
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.
Cool! Maybe we can generalize it somehow so it will be used in other stories as well
showTrigger={showTrigger || [Dialog.hideShowTriggers.CLICK]} | ||
hideTrigger={hideTrigger || [Dialog.hideShowTriggers.CLICK]} |
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 give these two also a default in the signature
@@ -45,7 +45,8 @@ const fontLoader = async () => ({ | |||
const preview: Preview = { | |||
parameters: { | |||
controls: { | |||
sort: "alpha" | |||
sort: "alpha", | |||
expanded: true |
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.
🎉
@@ -1,4 +1,4 @@ | |||
import { Canvas, Meta } from "@storybook/blocks"; | |||
import { Meta } from "@storybook/blocks"; |
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.
💪🏼
options: Object.values(HideShowEvent), | ||
control: { | ||
type: "multi-select" | ||
}, | ||
table: { | ||
type: { | ||
summary: Object.values(HideShowEvent).join(" | ") | ||
} | ||
} | ||
}; |
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.
definitely should be (in a future enhancement, maybe create a task?) a common util, or as part of the createMeta
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'll create a task for it in the backlog
https://monday.monday.com/boards/3532714909/pulses/6494820733