Fix Button styling

This commit is contained in:
2021-10-02 13:21:40 +02:00
parent 77c19ff43f
commit 25ef6b37d1
2 changed files with 11 additions and 7 deletions

View File

@@ -2,15 +2,20 @@
export let text: string
export let tag: string = 'a'
export let url: string = undefined
const classes = [
'button',
$$props.class
].join(' ')
</script>
{#if tag === 'button'}
<button class="button {$$props.class}">
<button class={classes}>
<slot />
{text}
</button>
{:else if tag === 'a'}
<a href={url} class="button {$$props.class}">
<a href={url} class={classes}>
<slot />
<span>{text}</span>
</a>

View File

@@ -1,13 +1,11 @@
.button {
display: inline-flex;
height: 48px;
align-items: center;
background: #fff;
height: 48px;
padding: 0 24px;
background: #fff;
font: 900 #{rem(18px)}/1 $font-sans;
color: $color-text;
font-size: rem(18px);
line-height: 1;
font-weight: 700;
border-radius: 100vh;
border: none;
text-decoration: none;
@@ -22,6 +20,7 @@
// Small
&--small {
height: 40px;
padding: 0 16px;
}
// Color Variants