master
svelte 18 lines 509 Bytes
Raw
1 <script lang="ts">
2 import { createEventDispatcher, onMount } from "svelte";
3
4 export let label = "Button";
5 export let type: "button" | "submit" | "reset" = "button";
6 export let style: "primary" | "secondary" | "accent" | "danger" = "primary";
7 export let _class = "";
8
9 export let disabled = false;
10 </script>
11
12 <button class="action-button {style} {_class}" type="{type}" disabled={disabled} on:click on:submit>{label}</button>
13
14 <style>
15 .action-button {
16 border-radius: 3px;
17 }
18 </style>