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 className = "default"
|
|
|
|
export let disabled = false
|
2020-05-08 21:29:15 +02:00
|
|
|
export let text
|
2020-11-25 10:50:51 +01:00
|
|
|
export let onClick
|
2019-08-19 22:18:23 +02:00
|
|
|
</script>
|
|
|
|
|
2020-11-24 12:02:10 +01:00
|
|
|
<button
|
|
|
|
class="default"
|
|
|
|
disabled={disabled || false}
|
2020-11-25 10:50:51 +01:00
|
|
|
use:styleable={$component.styles}
|
|
|
|
on:click={onClick}>
|
2020-11-17 13:08:24 +01:00
|
|
|
{text}
|
2019-08-27 08:32:56 +02:00
|
|
|
</button>
|
|
|
|
|
|
|
|
<style>
|
2020-02-03 10:50:30 +01:00
|
|
|
.default {
|
2020-06-03 23:49:55 +02:00
|
|
|
align-items: center;
|
2020-10-16 09:35:15 +02:00
|
|
|
padding: var(--spacing-s) var(--spacing-l);
|
2020-02-03 10:50:30 +01:00
|
|
|
box-sizing: border-box;
|
2020-06-03 23:49:55 +02:00
|
|
|
border-radius: 4px;
|
2020-02-03 10:50:30 +01:00
|
|
|
outline: none;
|
2020-06-03 23:49:55 +02:00
|
|
|
cursor: pointer;
|
|
|
|
transition: all 0.2s ease 0s;
|
|
|
|
overflow: hidden;
|
|
|
|
outline: none;
|
|
|
|
user-select: none;
|
|
|
|
white-space: nowrap;
|
|
|
|
text-align: center;
|
2020-02-03 10:50:30 +01:00
|
|
|
}
|
|
|
|
</style>
|