🎨 add ButtonComponent

Co-authored-by: haraldnilsen <harald_998@hotmail.com>
Signed-off-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
Sindre Kjelsrud 2023-12-12 19:58:52 +01:00
parent 09e4ae70d9
commit d0bfa5bb79
Signed by untrusted user who does not match committer: sidski
GPG key ID: D2BBDF3EDE6BA9A6
3 changed files with 22 additions and 2 deletions

View file

@ -0,0 +1,15 @@
<script>
export let text;
export let url;
export let filled = false;
let style;
if (!filled) {
style = "text-primary font-bold uppercase border-primary border-2 rounded-full px-8 py-3 hover:bg-primary hover:text-bg";
} else {
style = "bg-primary text-bg font-bold uppercase border-primary border-2 rounded-full px-8 py-3 hover:bg-bg hover:text-primary";
}
</script>
<button class={style}><a href={url}>{text}</a></button>