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

docs(examples): add theming example #4948

Merged
merged 7 commits into from
Sep 16, 2024
Merged

Conversation

joshblack
Copy link
Member

@joshblack joshblack commented Sep 10, 2024

Add a theming example to our examples directory. This example is to help us test out changes to ThemeProvider as we move over to CSS Modules.

Changelog

New

  • Add examples/theming example with Next.js App Router

Changed

Removed

Rollout strategy

  • None; if selected, include a brief description as to why

This is a local example that will not impact the public API of a Primer package

Copy link

changeset-bot bot commented Sep 10, 2024

⚠️ No Changeset found

Latest commit: a9e1964

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot added the staff Author is a staff member label Sep 10, 2024
Copy link
Contributor

github-actions bot commented Sep 10, 2024

size-limit report 📦

Path Size
packages/react/dist/browser.esm.js 97.47 KB (0%)
packages/react/dist/browser.umd.js 97.8 KB (0%)

@github-actions github-actions bot temporarily deployed to storybook-preview-4948 September 16, 2024 17:41 Inactive
@joshblack joshblack added the skip changeset This change does not need a changelog label Sep 16, 2024
@joshblack joshblack marked this pull request as ready for review September 16, 2024 18:11
@joshblack joshblack requested a review from a team as a code owner September 16, 2024 18:11
@github-actions github-actions bot temporarily deployed to storybook-preview-4948 September 16, 2024 18:12 Inactive
Copy link
Member

@jonrohan jonrohan left a comment

Choose a reason for hiding this comment

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

Awesome 👍🏻

>
<body>
<StyledComponentsRegistry>
<ThemeProvider colorMode={colorMode}>
Copy link
Member

Choose a reason for hiding this comment

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

Should we note that <ThemeProvider here is temporary?

Copy link
Member Author

Choose a reason for hiding this comment

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

No preference on my end, happy to add it if it would be helpful 👍

Comment on lines +22 to +24
data-color-mode={colorMode}
data-light-theme="light"
data-dark-theme="dark"
Copy link
Member

Choose a reason for hiding this comment

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

Like the idea that this could one day be a helper function

Suggested change
data-color-mode={colorMode}
data-light-theme="light"
data-dark-theme="dark"
{...colorThemeAttributes(colorMode)}

Merged via the queue into main with commit 91f7862 Sep 16, 2024
32 checks passed
@joshblack joshblack deleted the docs/add-theming-example branch September 16, 2024 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip changeset This change does not need a changelog staff Author is a staff member
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants