you wouldn't redesign a whole app in one commit

This commit is contained in:
ari melody 2024-06-28 06:19:00 +01:00
parent 957a067568
commit 7669c5b4d6
Signed by: ari
GPG key ID: CF99829C92678188
69 changed files with 1232 additions and 506 deletions

View file

@ -0,0 +1,66 @@
<script>
import { play_sound } from '../../sound.js';
export let icon = "🔧";
export let type = "action";
export let label = "Action";
export let title = label;
export let count = 0;
export let sound = "default";
</script>
<button
type="button"
class="{type}"
aria-label="{label}"
title="{title}"
on:click|stopPropagation={() => (play_sound(sound))}>
<span class="icon">{@html icon}</span>
{#if count}
<span class="count">{count}</span>
{/if}
</button>
<style>
button {
height: 32px;
padding: 6px 8px;
display: flex;
flex-direction: row;
gap: 4px;
font-size: 1em;
background: none;
color: inherit;
border: none;
border-radius: 8px;
}
button.active {
background: var(--accent);
color: var(--bg0);
}
button:hover {
background: #8881;
}
button:active {
background: #0001;
}
.icon {
width: 20px;
height: 20px;
display: flex;
justify-content: center;
align-items: center;
}
.count {
opacity: .5;
}
button:hover .count {
opacity: 1;
}
</style>