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(useDark): note about default localStorage key #2236

Merged
merged 2 commits into from
Sep 26, 2022
Merged

Conversation

kcole93
Copy link
Contributor

@kcole93 kcole93 commented Sep 21, 2022

Description

This PR clarifies the default behavior of the isDark composable, which persists the current value to localStorage under the key vueuse-color-scheme, and fixes a few grammatical points in the remainder of the page for clarity.

Additional context

While the docs say that this composable reads "the value from localStorage/sessionStorage (the key is configurable) to see if there is a user configured color scheme," it's not illustrated how this key can be configured. I'm not sure how that is done, so I just added information about the default behavior.


What is the purpose of this pull request?

  • Bug fix
  • New Feature
  • Documentation update
  • Other

Before submitting the PR, please make sure you do the following

  • Read the Contributing Guidelines.
  • Read the Pull Request Guidelines.
  • Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
  • Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
  • Ideally, include relevant tests that fail without this PR but pass with it.

This PR clarifies the default behavior of the isDark composable, which persists the current value to localStorage under the key `vueuse-color-scheme`, and fixes a few grammatical points in the remainder of the page for clarity.
@@ -37,7 +37,7 @@ By default, it uses [Tailwind CSS favored dark mode](https://tailwindcss.com/doc
<html class="dark"> ... </html>
```

While you can customize it and make it work for most of the CSS frameworks.
Stillm you can also customize it to make it work with most CSS frameworks.
Copy link
Member

Choose a reason for hiding this comment

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

Is Stillm a typo?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, sorry about that. It should read: "Still,"

"Stillm" --> "Still,"
@antfu antfu changed the title Include information on default localStorage key docs(useDark): not about default localStorage key Sep 26, 2022
@antfu antfu merged commit ee310f5 into vueuse:main Sep 26, 2022
@antfu antfu changed the title docs(useDark): not about default localStorage key docs(useDark): note about default localStorage key Sep 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants