2019-08-19 22:18:23 +02:00
|
|
|
<script>
|
2020-11-18 20:18:18 +01:00
|
|
|
import { getContext } from "svelte"
|
|
|
|
|
2020-11-20 10:50:10 +01:00
|
|
|
const { styleable } = getContext("sdk")
|
2020-11-24 12:02:10 +01:00
|
|
|
const component = getContext("component")
|
2020-11-17 13:08:24 +01:00
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
export let disabled = false
|
2021-01-14 10:45:09 +01:00
|
|
|
export let text = ""
|
2020-11-25 10:50:51 +01:00
|
|
|
export let onClick
|
2021-06-16 19:14:23 +02:00
|
|
|
export let size = "M"
|
|
|
|
export let type = "primary"
|
2019-08-19 22:18:23 +02:00
|
|
|
</script>
|
|
|
|
|
2020-11-24 12:02:10 +01:00
|
|
|
<button
|
2021-06-16 19:14:23 +02:00
|
|
|
class={`spectrum-Button spectrum-Button--size${size} spectrum-Button--${type}`}
|
2020-11-24 12:02:10 +01:00
|
|
|
disabled={disabled || false}
|
2020-11-25 10:50:51 +01:00
|
|
|
use:styleable={$component.styles}
|
2021-05-04 12:04:42 +02:00
|
|
|
on:click={onClick}
|
|
|
|
>
|
|
|
|
{text || ""}
|
2021-06-17 00:27:38 +02:00
|
|
|
</button>
|