Skip to content

Theme Switcher #784

Discussion options

You must be logged in to vote

Cant you already do that using a dropdown and some alpine?

something like:

<flux:tooltip content="Switch to dark mode">
    <flux:navbar.item icon="moon" iconVariant="outline" iconSize="sm" label="Dark mode" @click="$store.darkMode.toggle()" x-show="!$store.darkMode.mode == 'dark'" x-cloak></flux:menu.item>
</flux:tooltip>
<flux:tooltip content="Switch to light mode">
    <flux:navbar.item icon="sun" label="Light mode" @click="$store.darkMode.toggle()" x-show="$store.darkMode.mode == 'light'" x-cloak></flux:menu.item>
</flux:tooltip>
 

or as a dropdown

<flux:dropdown>
    <flux:button icon-trailing="chevron-down">
       <flux:icon.sun x-cloak x-show="$store.darkMode.mode == 'sun'" />
   …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by nerisonpitogo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants