♻️ refactored code

This commit is contained in:
haraldnilsen 2023-12-14 19:31:08 +01:00
parent 4cd2ed9a8a
commit 9bc69f9c58
9 changed files with 73 additions and 69 deletions

View file

@ -0,0 +1,15 @@
<script lang="ts">
export let text: string;
export let url: string;
export let filled = false;
let style:string;
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>
<a href={url}><button class={style}>{text}</button></a>

View file

@ -4,7 +4,7 @@
<div class="flex justify-between w-full">
{#each options as data, index (data)}
<div class="flex flex-col justify-start items-center w-12 text-center">
<div class="flex flex-col justify-start items-center w-12 text-center">
<button name={data} class="h-6 w-6 rounded-full border-2 border-primary hover:bg-primary"></button>
<label class="text-primary text-sm mt-1" for={data}>{data}</label>
</div>