2020-01-30 17:22:19 +01:00
|
|
|
<script>
|
2020-02-03 10:50:30 +01:00
|
|
|
export let disabled = false
|
|
|
|
export let hidden = false
|
2020-06-02 20:59:58 +02:00
|
|
|
export let secondary = false
|
2020-02-03 10:50:30 +01:00
|
|
|
export let primary = true
|
2020-03-19 13:31:23 +01:00
|
|
|
export let cancel = false
|
2020-02-03 10:50:30 +01:00
|
|
|
export let alert = false
|
|
|
|
export let warning = false
|
2020-01-30 17:22:19 +01:00
|
|
|
</script>
|
|
|
|
|
2020-02-03 10:50:30 +01:00
|
|
|
<button
|
|
|
|
on:click
|
|
|
|
class="button"
|
|
|
|
class:hidden
|
2020-06-02 20:59:58 +02:00
|
|
|
class:secondary
|
2020-02-03 10:50:30 +01:00
|
|
|
class:primary
|
|
|
|
class:alert
|
2020-03-19 13:31:23 +01:00
|
|
|
class:cancel
|
2020-02-03 10:50:30 +01:00
|
|
|
class:warning
|
|
|
|
{disabled}>
|
|
|
|
<slot />
|
|
|
|
</button>
|
|
|
|
|
2020-01-30 17:22:19 +01:00
|
|
|
<style>
|
2020-01-31 10:45:02 +01:00
|
|
|
.primary {
|
2020-03-19 13:31:23 +01:00
|
|
|
color: #ffffff;
|
2020-06-02 20:59:58 +02:00
|
|
|
background: var(--blue);
|
|
|
|
border: solid 1px var(--blue);
|
2020-01-31 10:45:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.alert {
|
2020-06-02 20:59:58 +02:00
|
|
|
color: white;
|
|
|
|
background: #E26D69;
|
|
|
|
border: solid 1px #E26D69;
|
2020-01-31 10:45:02 +01:00
|
|
|
}
|
|
|
|
|
2020-03-19 13:31:23 +01:00
|
|
|
.cancel {
|
|
|
|
color: var(--secondary40);
|
|
|
|
background: none;
|
|
|
|
}
|
|
|
|
|
2020-06-02 20:59:58 +02:00
|
|
|
.secondary {
|
|
|
|
color: var(--ink);
|
|
|
|
border: solid 1px var(--grey-dark);
|
2020-06-02 21:55:15 +02:00
|
|
|
background: white;
|
2020-06-02 20:59:58 +02:00
|
|
|
}
|
|
|
|
|
2020-01-31 10:45:02 +01:00
|
|
|
.button {
|
2020-02-24 16:00:48 +01:00
|
|
|
font-size: 14px;
|
2020-06-02 20:59:58 +02:00
|
|
|
font-weight: 500;
|
2020-06-02 21:55:15 +02:00
|
|
|
border-radius: 3px;
|
2020-03-19 13:31:23 +01:00
|
|
|
padding: 10px 20px;
|
2020-06-02 20:59:58 +02:00
|
|
|
height: 40px;
|
2020-01-30 17:22:19 +01:00
|
|
|
}
|
|
|
|
|
2020-01-31 10:45:02 +01:00
|
|
|
.button:hover {
|
2020-01-30 17:22:19 +01:00
|
|
|
cursor: pointer;
|
2020-05-07 11:53:34 +02:00
|
|
|
filter: saturate(90%);
|
2020-01-30 17:22:19 +01:00
|
|
|
}
|
|
|
|
|
2020-01-31 10:45:02 +01:00
|
|
|
.button:disabled {
|
2020-01-30 22:00:19 +01:00
|
|
|
color: rgba(22, 48, 87, 0.2);
|
2020-01-30 17:22:19 +01:00
|
|
|
cursor: default;
|
|
|
|
background: transparent;
|
|
|
|
}
|
2020-01-30 21:01:18 +01:00
|
|
|
|
|
|
|
.hidden {
|
|
|
|
visibility: hidden;
|
|
|
|
}
|
2020-01-30 17:22:19 +01:00
|
|
|
</style>
|