-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: change layouts and make components more designable
- Loading branch information
1 parent
f263008
commit 1de5bfb
Showing
5 changed files
with
39 additions
and
20 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
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
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,22 @@ | ||
<script lang="ts"> | ||
import { Play, Stop } from '@steeze-ui/heroicons'; | ||
import { Icon } from '@steeze-ui/svelte-icon'; | ||
import { getMetronomeContext } from './context'; | ||
const metronome = getMetronomeContext(); | ||
$: isRunning = metronome.isRunning; | ||
</script> | ||
|
||
<button | ||
{...$$restProps} | ||
class="{$$props.class} flex aspect-square items-center justify-center rounded-full bg-indigo-900 p-0 focus:outline-none" | ||
on:click={() => { | ||
metronome.toggle(); | ||
isRunning = metronome.isRunning; | ||
}} | ||
> | ||
{#if isRunning} | ||
<Icon class="m-0 h-1/2 p-0 text-indigo-100" src={Stop} theme="solid" /> | ||
{:else} | ||
<Icon class="m-0 h-1/2 p-0 text-indigo-100" src={Play} theme="solid" /> | ||
{/if} | ||
</button> |
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
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