-
Notifications
You must be signed in to change notification settings - Fork 19
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
chore: add storybook #1138
chore: add storybook #1138
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
8342413
to
aaf1636
Compare
stories/theme/Color.stories.tsx
Outdated
export default meta | ||
type Story = StoryObj<typeof ColorScreen> | ||
|
||
export const Overview: Story = { |
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.
Do we need this story to be called Overview? could it simply be "Docs" ? And we get only on story generated for this file
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.
Good question – I opted against "Docs" since this is a composite component (it's not exported and receives no props / has no controls).
It should probably be rendered as a page rather than a story, which might make this relationship a little more explicit in the sidebar?
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.
Makes sense, no need to change it.
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 think this is great.
Pushed a PR adding a new story for tooltips to have a demo using play function inside the stories.
Will appreciate your thoughts in that #1139
Do you think we could have a README file in the root of storybook stories to indicate some of the findings that you discovered with the current implementation?
I think it's worth mentioning (some copied from your PR description)
- Theme scheme (dark / light mode) toggles only apply to the stories themselves (not the entire interface)
- All stories are wrapped with a common decorator which wraps stories in both a
<ThemeProvider>
but also a<Card>
with padding - We may want to consider highlighting this, as usage of some props (e.g. muted on
<Text>
have no effect without a wrapping<Card>
) - Not accepting to change titles in the export default of stories.
- Folders structure.
- Docs component behaviour
* chore: add tooltip story with play function * fixup! chore: add tooltip story with play function
…onfig, bump storybook deps
New dependencies detected. Learn more about Socket for GitHub ↗︎
|
…ybook config, bump storybook deps
a09c98c
to
ed50b9d
Compare
* chore: add storybook * chore: add tooltip story with play function (#1139) * chore: add tooltip story with play function * fixup! chore: add tooltip story with play function * chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * fixup! chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * chore(storybook): update argType control overrides --------- Co-authored-by: Pedro Bonamin <[email protected]>
* chore: add storybook * chore: add tooltip story with play function (#1139) * chore: add tooltip story with play function * fixup! chore: add tooltip story with play function * chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * fixup! chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * chore(storybook): update argType control overrides --------- Co-authored-by: Pedro Bonamin <[email protected]>
* chore: add storybook * chore: add tooltip story with play function (#1139) * chore: add tooltip story with play function * fixup! chore: add tooltip story with play function * chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * fixup! chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * chore(storybook): update argType control overrides --------- Co-authored-by: Pedro Bonamin <[email protected]>
* chore: add storybook * chore: add tooltip story with play function (#1139) * chore: add tooltip story with play function * fixup! chore: add tooltip story with play function * chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * fixup! chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * chore(storybook): update argType control overrides --------- Co-authored-by: Pedro Bonamin <[email protected]>
* chore: add storybook * chore: add tooltip story with play function (#1139) * chore: add tooltip story with play function * fixup! chore: add tooltip story with play function * chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * fixup! chore(storybook): add primitive stories, README, clean up storybook config, bump storybook deps * chore(storybook): update argType control overrides --------- Co-authored-by: Pedro Bonamin <[email protected]>
Description
This PR adds Storybook for local component development as we evaluate its usage for MVI-2 and beyond.
Things to note:
<ThemeProvider>
but also a<Card>
with paddingmuted
on<Text>
have no effect without a wrapping<Card>
)@sanity/color
color spectrum story, which may be useful as a referencestories/constants.ts
defines a number of preconfigured Storybook controls which are imported in each story's meta definition. There may be a way to either obviate a lot of this via typing in future, or at the very least define these settings globallyui-workshop
usage and associated stories are unaffected