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

Addon-themes: Migrate to story globals #27525

Closed
3 tasks
Tracked by #27210
shilman opened this issue Jun 3, 2024 · 0 comments
Closed
3 tasks
Tracked by #27210

Addon-themes: Migrate to story globals #27525

shilman opened this issue Jun 3, 2024 · 0 comments
Assignees
Labels
addon: themes maintenance User-facing maintenance tasks

Comments

@shilman
Copy link
Member

shilman commented Jun 3, 2024

Describe the problem

Describe the problem

Story globals simplifies how to configure globals at the story level. We should update the Themes addon to use the new scheme.

  • Figure out a final API
    • globals for storing/accessing state
  • Update documentation

Before

export const Story = {
  parameters: {
    themes: {
      default: 'twitter',
      list: [
        { name: 'twitter', class: ['theme-twt', 'light-mode'], color: '#00aced' },
        { name: 'facebook', class: ['theme-fb', 'dark-mode'], color: '#3b5998' },
      ],
    },
  },
};

After (TBD)

export const Story = {
  globals: {
    theme: 'twitter',
  },
};

Additional context

We should also try to reconcile Chromatic Modes if we can

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addon: themes maintenance User-facing maintenance tasks
Projects
None yet
Development

No branches or pull requests

3 participants