🎨 add ButtonComponent
Co-authored-by: haraldnilsen <harald_998@hotmail.com> Signed-off-by: Sindre Kjelsrud <kjelsrudsindre@gmail.com>
This commit is contained in:
parent
09e4ae70d9
commit
d0bfa5bb79
3 changed files with 22 additions and 2 deletions
15
frontend/src/components/ButtonComponent.svelte
Normal file
15
frontend/src/components/ButtonComponent.svelte
Normal 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>
|
Reference in a new issue