summaryrefslogtreecommitdiffstatshomepage
path: root/frontend/src/lib/components/Expander.svelte
blob: a3826581a0796ff8f29a1034b4dd8d34a8a8e1cc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<script lang="ts">
	export let expanded: boolean;
	export let title: string;
</script>

<button
	class="flex items-center text-base hover:text-white"
	type="button"
	on:click={() => (expanded = !expanded)}
>
	{#if expanded}
		<span class="icon-base icon-[material-symbols--expand-less]" />
	{:else}
		<span class="icon-base icon-[material-symbols--expand-more]" />
	{/if}
	{title}
</button>