-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: refactoring the main library exports
- Loading branch information
Showing
17 changed files
with
646 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,19 @@ | ||
<script lang="ts"> | ||
import { storyblokEditable, StoryblokComponent } from '@storyblok/svelte'; | ||
<script> | ||
import { | ||
storyblokEditable, | ||
StoryblokComponent, | ||
renderRichText, | ||
} from "@storyblok/svelte"; | ||
let { blok } = $props(); | ||
let resolvedRichText = $derived(renderRichText(blok.richText)); | ||
</script> | ||
|
||
<div use:storyblokEditable={blok} class="container"> | ||
{#each blok.body as item} | ||
<div> | ||
<StoryblokComponent blok={item} /> | ||
</div> | ||
{/each} | ||
</div> | ||
{#key blok} | ||
<div use:storyblokEditable={blok} class="px-6"> | ||
{#each blok.body as bodyBlok} | ||
<StoryblokComponent blok={bodyBlok} /> | ||
{/each} | ||
<div class="prose">{@html resolvedRichText}</div> | ||
</div> | ||
{/key} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,7 @@ | ||
<script lang="ts"> | ||
import type { LayoutData } from './$types'; | ||
import type { Snippet } from 'svelte'; | ||
let { data, children }: { data: LayoutData, children: Snippet } = $props(); | ||
let { children }: { children: Snippet } = $props(); | ||
</script> | ||
|
||
{@render children()} | ||
{@render children?.()} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.