-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6419946
commit 1644edb
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Dark Mode | ||
|
||
This package has theme switching functionality. You can switch between light and dark mode by clicking the button in the top right corner of the page. | ||
|
||
It will set something like `data-theme="dark"` to the root HTML element. | ||
|
||
## Tailwind CSS | ||
|
||
If your project use Tailwind CSS, please config `tailwind.config.js` | ||
|
||
```js | ||
module.exports = { | ||
darkMode: ["selector", '[data-theme="dark"]'], | ||
} | ||
``` | ||
|
||
If TailwindCSS detect `data-theme="dark"` in the root HTML element, it will apply dark mode styles. |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,4 +13,5 @@ Topics | |
install_with_viewcomponent.md | ||
write_preview.md | ||
params.md | ||
dark.md | ||
contributing.md |