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
|
|
|
|
export let primary = true
|
|
|
|
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
|
|
|
|
class:primary
|
|
|
|
class:alert
|
|
|
|
class:warning
|
|
|
|
{disabled}>
|
|
|
|
<slot />
|
|
|
|
</button>
|
|
|
|
|
2020-01-30 17:22:19 +01:00
|
|
|
<style>
|
2020-01-31 10:45:02 +01:00
|
|
|
.primary {
|
2020-01-30 17:22:19 +01:00
|
|
|
color: #0055ff;
|
|
|
|
background: rgb(54, 133, 249, 0.1);
|
2020-01-31 10:45:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.alert {
|
|
|
|
color: rgba(255, 0, 31, 1);
|
2020-02-03 10:50:30 +01:00
|
|
|
background: rgba(255, 0, 31, 0.1);
|
2020-01-31 10:45:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
.button {
|
2020-02-24 16:00:48 +01:00
|
|
|
font-size: 14px;
|
2020-01-30 17:22:19 +01:00
|
|
|
font-weight: bold;
|
|
|
|
border-radius: 5px;
|
|
|
|
border: none;
|
2020-02-24 17:41:02 +01:00
|
|
|
min-width: 120px;
|
2020-02-24 16:00:48 +01:00
|
|
|
height: 45px;
|
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-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>
|