add target and rel to button

This commit is contained in:
Nikita Galaiko 2023-04-04 12:03:15 +02:00
parent 9a6068737d
commit 226a369d58
2 changed files with 7 additions and 0 deletions

View File

@ -138,6 +138,7 @@
{#each [false, true] as loading}
<Button
href="https://gitbutler.com"
target="_blank"
role="basic"
{outlined}
{filled}
@ -174,6 +175,7 @@
{#each [false, true] as disabled}
<Button
href="https://gitbutler.com"
target="_blank"
role="primary"
{filled}
{disabled}
@ -210,6 +212,7 @@
{#each [false, true] as disabled}
<Button
href="https://gitbutler.com"
target="_blank"
role="destructive"
{filled}
{disabled}

View File

@ -2,6 +2,8 @@
import type { ComponentType } from 'svelte';
import { IconLoading } from '../icons';
export let target: string | undefined = undefined;
export let rel: string | undefined = undefined;
export let role: 'basic' | 'primary' | 'destructive' = 'basic';
export let filled = true;
export let outlined = false;
@ -17,6 +19,8 @@
{#if href}
<a
{href}
{target}
{rel}
class={role}
class:small={height === 'small'}
class:long={width === 'long'}