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

Provide the color mode button in every Stackblitz example #39112

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

louismaximepiton
Copy link
Member

@louismaximepiton louismaximepiton commented Aug 25, 2023

Description

Add the theme toggler to the StackBlitz examples.
Don't hesitate to propose your ideas.

Motivation & Context

Help people seing the dark mode with live examples.

Type of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Refactoring (non-breaking change)
  • Breaking change (fix or feature that would change existing functionality)

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Live previews

Related issues

Might close some items in #37549.

@julien-deramond
Copy link
Member

I have mixed feelings about this feature. On one hand, I find it useful because one doesn't have to integrate the whole system manually and can help to represent or test something in StackBlitz. On the other hand, it adds a lot of code in the index.html in StackBlitz and folks can be lost with this amount of code compared to the simplicity of just having the source code of the component for instance from the documentation.

Without this feature, they still can start from https://github.com/twbs/examples/tree/main/color-modes or simply add data-bs-theme="dark" on the body (or somewhere else) if they want to test something specific to the dark mode.

@mdo Do you have a strong opinion regarding this new doc feature?

@louismaximepiton
Copy link
Member Author

Just revamped the template so it's way more understandable from a user pov (There's no more html added to the markup and the js stands aside). What'd you think of this solution ? It might be worth a try.

@louismaximepiton louismaximepiton requested a review from a team as a code owner July 23, 2024 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Needs review
Development

Successfully merging this pull request may close these issues.

2 participants