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

Doc: Update dark-mode.md to fix toggle component link #960

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions content/customize/dark-mode.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ This will first check if you've previously set the theme color preference manual
</button>
```

In this example we used a `<button>` component where we change the icon inside based on the current color scheme. You can also use other elements, such as the [toggle component]({{< ref "components/forms" >}}).
In this example we used a `<button>` component where we change the icon inside based on the current color scheme. You can also use other elements, such as the [toggle component](https://flowbite.com/docs/components/forms/#toggle-switch).

3. Add the following JavaScript inside your main file to handle the click events on the `<button>` element:

Expand Down Expand Up @@ -131,4 +131,4 @@ By using the components from Flowbite you automatically receive dark mode suppor
</div>
```

As you can see, when dark mode is activated the `.bg-gray-800` and `.text-white` takes over the default `.bg-white` and `.text-gray-900` classes. You can add as many styles using the `dark:{*}` variant.
As you can see, when dark mode is activated the `.bg-gray-800` and `.text-white` takes over the default `.bg-white` and `.text-gray-900` classes. You can add as many styles using the `dark:{*}` variant.