diff --git a/src/shared/ui/Section/Section.svelte b/src/shared/ui/Section/Section.svelte index e5b0c5f..6e827e4 100644 --- a/src/shared/ui/Section/Section.svelte +++ b/src/shared/ui/Section/Section.svelte @@ -25,6 +25,10 @@ interface Props extends Omit, 'title'> { * Snippet for a title icon */ icon?: Snippet<[{ className?: string }]>; + /** + * Snippet for a title description + */ + description?: Snippet<[{ className?: string }]>; /** * Index of the section */ @@ -44,7 +48,7 @@ interface Props extends Omit, 'title'> { children?: Snippet; } -const { class: className, title, icon, index = 0, onTitleStatusChange, children }: Props = $props(); +const { class: className, title, icon, description, index = 0, onTitleStatusChange, children }: Props = $props(); let titleContainer = $state(); const flyParams: FlyParams = { y: 0, x: -50, duration: 300, easing: cubicOut, opacity: 0.2 }; @@ -92,7 +96,9 @@ $effect(() => { {@render icon({ className: 'size-4 stroke-gray-900 stroke-1' })}
{/if} - {#if typeof index === 'number'} + {#if description} + {@render description({ className: 'font-mono text-[10px] uppercase tracking-[0.2em] text-gray-600' })} + {:else if typeof index === 'number'} Component_{String(index).padStart(3, '0')}