2023-07-16 04:25:59 +03:00
|
|
|
<script lang="ts">
|
2024-11-14 08:43:25 -06:00
|
|
|
import type { Snippet } from 'svelte';
|
|
|
|
|
|
|
|
|
|
interface Props {
|
|
|
|
|
onClick: (e: MouseEvent) => void;
|
|
|
|
|
label: string;
|
|
|
|
|
children?: Snippet;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let { onClick, label, children }: Props = $props();
|
2023-07-16 04:25:59 +03:00
|
|
|
</script>
|
|
|
|
|
|
2024-05-27 09:06:15 +02:00
|
|
|
<button
|
|
|
|
|
type="button"
|
|
|
|
|
class="my-auto mx-4 rounded-full p-3 text-gray-500 transition hover:bg-gray-500 hover:text-white"
|
|
|
|
|
aria-label={label}
|
2024-11-14 08:43:25 -06:00
|
|
|
onclick={onClick}
|
2024-05-27 09:06:15 +02:00
|
|
|
>
|
2024-11-14 08:43:25 -06:00
|
|
|
{@render children?.()}
|
2024-05-27 09:06:15 +02:00
|
|
|
</button>
|