Fix Button styling
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user