agent: components — add shared EmptyState component
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
17
src/lib/components/EmptyState.svelte
Normal file
17
src/lib/components/EmptyState.svelte
Normal file
@@ -0,0 +1,17 @@
|
||||
<script>
|
||||
let { icon: Icon = null, message = '', actionLabel = '', onAction = null } = $props();
|
||||
</script>
|
||||
|
||||
<div class="flex flex-col items-center justify-center gap-4 py-16 text-text-secondary">
|
||||
{#if Icon}
|
||||
<Icon size={48} strokeWidth={1} class="opacity-40" aria-hidden="true" />
|
||||
{/if}
|
||||
<p class="text-center max-w-xs leading-relaxed">{message}</p>
|
||||
{#if actionLabel && onAction}
|
||||
<button onclick={onAction}
|
||||
class="px-4 py-2 rounded-lg bg-accent text-bg text-sm font-medium hover:bg-accent-hover"
|
||||
style="transition-duration: var(--duration-ui)">
|
||||
{actionLabel}
|
||||
</button>
|
||||
{/if}
|
||||
</div>
|
||||
Reference in New Issue
Block a user