File size: 639 Bytes
11fcc5a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<script lang="ts">
    export let id: string;
    export let click: () => void;
    export let danger = false;
</script>

<button {id} class="button data-button" class:danger on:click={click}>
    <slot></slot>
</button>

<style>
    .data-button {
        padding: 8px 14px;
        width: max-content;
        text-align: start;
    }

    .data-button :global(svg) {
        stroke-width: 1.8px;
        height: 21px;
        width: 21px;
    }

    .data-button.danger {
        background-color: var(--red);
        color: var(--white);
    }

    .data-button.danger:hover {
        background-color: var(--dark-red);
    }
</style>