File size: 552 Bytes
41a5ab2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<script lang="ts">
	import { X } from '@lucide/svelte';
	import { Button } from '$lib/components/ui/button';

	interface Props {
		id: string;
		onRemove?: (id: string) => void;
		class?: string;
	}

	let { id, onRemove, class: className = '' }: Props = $props();
</script>

<Button
	type="button"
	variant="ghost"
	size="sm"
	class="h-6 w-6 bg-white/20 p-0 hover:bg-white/30 {className}"
	onclick={(e: MouseEvent) => {
		e.stopPropagation();
		onRemove?.(id);
	}}
	aria-label="Remove file"
>
	<X class="h-3 w-3" />
</Button>