schoolbox web extension :)
1<script lang="ts">
2 import type { Snippet } from "svelte";
3
4 interface Props {
5 children: Snippet;
6 title: string;
7 id: string;
8 onclick: () => void;
9 classList?: string;
10 }
11
12 let { children, title, id, onclick, classList = "text-ctp-text hover:bg-ctp-surface1" }: Props = $props();
13</script>
14
15<button {title} {id} class="bg-ctp-surface0 small flex h-8 cursor-pointer items-center gap-3 {classList}" {onclick}>
16 {@render children()}
17</button>