Skip to content

Commit

Permalink
chore(bridge-ui-v2): animate the theme button and align with design (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
KorbinianK authored Oct 6, 2023
1 parent a4a982e commit d4d98b2
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
<script lang="ts">
import { onMount } from 'svelte';
import { Button } from '$components/Button';
import { Icon } from '$components/Icon';
let theme: 'dark' | 'light' = 'dark';
let theme: 'dark' | 'light' = (localStorage.getItem('theme') as 'dark' | 'light') || 'dark';
$: isDarkTheme = theme === 'dark';
function switchTheme() {
Expand All @@ -24,8 +23,8 @@
});
</script>

<div class="flex items-center">
<Button class="bg-transparent hover:bg-neutral rounded-full p-[5px] rounded-full" on:click={switchTheme}>
<Icon type={isDarkTheme ? 'moon' : 'sun'} width={25} height={25} />
</Button>
</div>
<label class="swap swap-rotate">
<input type="checkbox" class="border-none" bind:checked={isDarkTheme} on:change={switchTheme} />
<Icon type="sun" class="fill-primary-icon swap-on" width={25} height={25} vHeight={25} vWidth={25} />
<Icon type="moon" class="fill-primary-icon swap-off" width={25} height={25} vHeight={25} vWidth={25} />
</label>

1 comment on commit d4d98b2

@vercel
Copy link

@vercel vercel bot commented on d4d98b2 Oct 6, 2023

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

bridge-ui-v2-internal – ./packages/bridge-ui-v2

bridge-ui-v2-internal-git-main-taikoxyz.vercel.app
bridge-ui-v2-internal-taikoxyz.vercel.app
bridge-ui-v2-internal.vercel.app

Please sign in to comment.