Skip to content
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

feat(storybook): add context add for theme #876

Merged
merged 2 commits into from
Jun 19, 2019
Merged

Conversation

montezume
Copy link
Contributor

Summary

As theming is still a beta feature, we don't have much documentation about it. Not all components support theming. Most inputs do at the moment.

This PR adds the ability in storybook to change to a (very basic) dark theme.

const darkTheme = {
  colorSolid: vars.colorSurface,
  colorSurface: vars.colorSolid,
};

dark theme

@montezume montezume self-assigned this Jun 19, 2019
@montezume montezume added the 💅 Type: Enhancement Improves existing code label Jun 19, 2019
const defaultTheme = vars;

const ThemeWrapper = props => {
return <ThemeProvider theme={props.theme}>{props.children}</ThemeProvider>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: you just implicit return.

Copy link
Contributor

@jonnybel jonnybel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌚🌝

@montezume
Copy link
Contributor Author

FYI, what I would like to do is hook into the event emitted by the context addon and change the overall Storybook theme.

storybookjs/storybook#6418

But that can be a follow up.

@montezume montezume merged commit c87d581 into master Jun 19, 2019
@montezume montezume deleted the ml-context-theme branch June 19, 2019 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💅 Type: Enhancement Improves existing code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants