feat(Download): incompatibility warning

resolves #83
This commit is contained in:
afn
2023-05-20 18:21:55 -04:00
committed by GitHub
parent 344f976e7f
commit 315fdb77bb
5 changed files with 102 additions and 38 deletions

View File

@@ -1,6 +1,5 @@
<script>
export let kind = 'secondary';
$: type = 'button-' + kind;
<script lang="ts">
export let type: 'filled' | 'tonal' | 'text' | 'outlined';
export let icon = '';
export let href = '';
export let target = '';
@@ -8,22 +7,14 @@
<button on:click>
{#if href}
<a
{href}
{target}
{...$$restProps}
class={type}
>
<a {href} {target} {...$$restProps} class={`button-${type}`}>
{#if icon}
<img src="../icons/{icon}.svg" alt={icon} />
{/if}
<slot />
</a>
{:else}
<div
{...$$restProps}
class={type}
>
<div {...$$restProps} class={`button-${type}`}>
{#if icon}
<img src="../icons/{icon}.svg" alt={icon} />
{/if}
@@ -58,19 +49,20 @@
user-select: none;
}
.button-primary {
.button-filled {
background-color: var(--accent-color);
color: var(--grey-four);
}
.button-secondary {
.button-tonal {
background-color: var(--grey-two);
}
.button-primary, .button-secondary {
.button-filled,
.button-tonal {
padding: 16px 24px;
}
.button-tertiary {
.button-text {
background-color: transparent;
color: var(--accent-color);
font-weight: 500;