button-simple.svelte (721B)
1 <script lang="ts"> 2 import type { IButtonSimple } from "$lib/types/components/lib"; 3 import { parse_layer } from "@radroots/apps-lib"; 4 5 let { basis }: { basis: IButtonSimple } = $props(); 6 7 const layer = $derived(parse_layer(basis.layer || 1)); 8 </script> 9 10 <button 11 class={`group flex flex-row h-line_button w-full justify-center items-center rounded-touch bg-ly${layer} ly${layer}-active-surface ly${layer}-active-ring`} 12 onclick={async (ev) => { 13 if (!basis.allow_propogation) ev.stopPropagation(); 14 await basis.callback(); 15 }} 16 > 17 <p 18 class={`font-sans font-[600] text-xl text-ly0-gl capitalize tracking-wider opacity-active`} 19 > 20 {basis.label} 21 </p> 22 </button>