cleans up children snippet
This commit is contained in:
parent
72d26e2573
commit
ad707fdfe0
2 changed files with 7 additions and 6 deletions
|
|
@ -6,16 +6,17 @@
|
|||
* Whether to wrap the graphic with an aria hidden tag.
|
||||
*/
|
||||
hidden?: boolean;
|
||||
/** Content to put inside `AriaHidden`*/
|
||||
children: Snippet;
|
||||
}
|
||||
|
||||
let { hidden = false, children }: Props = $props();
|
||||
</script>
|
||||
|
||||
{#if hidden && children}
|
||||
{#if hidden}
|
||||
<div aria-hidden="true">
|
||||
{@render children()}
|
||||
</div>
|
||||
{:else if children}
|
||||
{:else}
|
||||
{@render children()}
|
||||
{/if}
|
||||
|
|
|
|||
|
|
@ -6,17 +6,17 @@
|
|||
interface Props {
|
||||
/** Width of the component within the text well. */
|
||||
width?: ContainerWidth;
|
||||
// children?: import('svelte').Snippet;
|
||||
children?: Snippet;
|
||||
/** Content to put inside `TextBlock`*/
|
||||
children: Snippet;
|
||||
}
|
||||
|
||||
let { width, children }: Props = $props();
|
||||
</script>
|
||||
|
||||
{#if width && children}
|
||||
{#if width}
|
||||
<Block {width} class="notes fmy-0">
|
||||
{@render children()}
|
||||
</Block>
|
||||
{:else if children}
|
||||
{:else}
|
||||
{@render children()}
|
||||
{/if}
|
||||
|
|
|
|||
Loading…
Reference in a new issue