Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

feat: Support multiple classes per theme in withThemeByClassName #10

Merged
merged 2 commits into from
Mar 24, 2023

Conversation

damianstasik
Copy link
Contributor

In my storybook I wanted to add different Tailwind classes to parentElement depending on a theme. For example, dark theme would have text-white bg-black and white theme: text-black bg-white. I was surprised to see the classic The token can not contain whitespace exception. This PR added support for multiple classes per theme:

withThemeByClassName({
  themes: {
    dark: 'text-white bg-black',
    white: 'text-black bg-white`,
  },
  defaultTheme: 'dark',
}),

Copy link
Contributor

@ShaunEvening ShaunEvening left a comment

Choose a reason for hiding this comment

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

Hey @damianstasik

Thank you so much for contributing to this new addon! I really appreciate it 🙏

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants