docs(styled-system): color mode#33
Open
carwack wants to merge 6 commits into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Collaborator
codebender828
left a comment
There was a problem hiding this comment.
Looks good. requested a change about the color mode script
Comment on lines
+139
to
+147
| ### Adding the `ColorModeScript` | ||
|
|
||
| The color mode script needs to be added before the content inside the `body` tag | ||
| for local storage syncing to work correctly. | ||
|
|
||
| This script will be added automatically by Chakra UI Vue. | ||
|
|
||
| > To use `ColorModeScript` on a site with strict `Content-Security-Policy`, you | ||
| > can use the `nonce` prop that will be passed to the `<script>` tag. |
Collaborator
There was a problem hiding this comment.
Let's remove this section. The user doesn't need to know about it. 👍🏽
codebender828
requested changes
May 20, 2023
Collaborator
codebender828
left a comment
There was a problem hiding this comment.
Looks good. requested a change about the color mode script
Shyrro
suggested changes
May 31, 2023
| scenarios, you might need to make your component respond to color mode. | ||
|
|
||
| > **Tip:** Chakra stores the color mode in `localStorage` or in `cookies` and appends a | ||
| > className to the `body` to ensure the color mode is persistent. |
Contributor
There was a problem hiding this comment.
Suggested change
| > className to the `body` to ensure the color mode is persistent. | |
| > class to the `body` to ensure the color mode is persistent. |
Maybe this is better since it's not React ?
| Here's an example that changes the `background-color` and `color` using the | ||
| `useColorModeValue` composable. | ||
|
|
||
| ```js |
Contributor
There was a problem hiding this comment.
Suggested change
| ```js | |
| ```vue |
Or html works
| `useColorMode` is a composable that gives you access to the current color mode, | ||
| and a function to toggle the color mode. | ||
|
|
||
| ```js |
Contributor
There was a problem hiding this comment.
Suggested change
| ```js | |
| ```vue |
Contributor
|
@carwack Looks good, great work ! I just added a few comments, nothing important, just some nitpicks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docs for Color mode in Chakra UI Vue.
Color Mode components are not completely working so far, testing out here: https://codesandbox.io/p/sandbox/intelligent-carlos-oyji8q?file=%2Fsrc%2Fcomponents%2FHelloChakra.vue%3A22%2C21