diff --git a/src/components/panel/Preview.svelte b/src/components/panel/Preview.svelte index fe9d55b..538f0b8 100644 --- a/src/components/panel/Preview.svelte +++ b/src/components/panel/Preview.svelte @@ -1,60 +1,39 @@ -
- - - - {$inspect(paddingX)} - - - -
- - + + + + + + diff --git a/src/components/panel/PreviewAll.svelte b/src/components/panel/PreviewAll.svelte new file mode 100644 index 0000000..dc3d1ad --- /dev/null +++ b/src/components/panel/PreviewAll.svelte @@ -0,0 +1,22 @@ + + +
+ {#each textsState.texts as { text, id }, idx (id)} + + {:else} +

No texts to preview

+ {/each} +
+ + diff --git a/src/components/panel/PreviewControls.svelte b/src/components/panel/PreviewControls.svelte index 6e4d335..c6ba9b1 100644 --- a/src/components/panel/PreviewControls.svelte +++ b/src/components/panel/PreviewControls.svelte @@ -3,6 +3,7 @@ import IconArrowLeft from "$components/ui/Icons/IconArrowLeft.svelte"; import IconArrowRight from "$components/ui/Icons/IconArrowRight.svelte"; import type { SlideDirectionType } from "$lib/constants"; + import { PANEL_SETTINGS } from "$lib/constants"; interface Props { current: number; @@ -24,6 +25,8 @@ if (current < max - 1) current++; direction = "next"; } + + let xDirection = $derived(direction == "next" ? PANEL_SETTINGS.PANEL_WIDTH : -PANEL_SETTINGS.PANEL_WIDTH);