File size: 853 Bytes
43a06dc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<script lang="ts">
    export let id: string;
    export let click = () => {
        alert("no function assigned");
    };
    export let fill = false;
    export let elevated = false;
    export let ariaLabel = "";
</script>

<button
    id="button-{id}"
    class="button vertical"
    class:fill
    class:elevated
    on:click={click}
    aria-label={ariaLabel}
>
    <slot></slot>
</button>

<style>
    .button.vertical {
        flex-direction: column;
        line-height: 1;
        padding: var(--padding);
        gap: calc(var(--padding) / 2);
    }

    .button.vertical :global(svg) {
        width: 24px;
        height: 24px;
    }

    .button.vertical.fill {
        width: 100%;
        padding: var(--padding) 0;
    }

    .button.vertical :global(svg) {
        stroke-width: 1.8px;
        color: var(--secondary);
    }
</style>