Slides kinda working

This commit is contained in:
Mawoka
2022-12-22 17:54:22 +01:00
parent 0af5aeef95
commit 8d8c524e94
7 changed files with 118 additions and 57 deletions
+1 -1
View File
@@ -187,7 +187,7 @@
</svg>
</button>-->
{#if el.type === ElementTypes.Text}
<TextElement bind:text={el.data} />
<TextElement bind:data={el.data} />
{:else if el.type === ElementTypes.Headline}
<HeadlineElement bind:data={el.data} />
{/if}
@@ -5,10 +5,17 @@
-->
<script lang="ts">
export let data;
export let editor = true;
</script>
<input
bind:value={data}
type="text"
class="w-full h-full dark:text-black text-center text-3xl min-h-fit"
/>
{#if editor}
<input
bind:value={data}
type="text"
class="w-full h-full dark:text-black text-center text-3xl min-h-fit"
/>
{:else}
<h2 class="w-full h-full text-center text-3xl min-h-fit">
{data}
</h2>
{/if}
@@ -4,13 +4,12 @@
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<script lang="ts">
export let text;
export let data;
export let editor = true;
</script>
<!--
- This Source Code Form is subject to the terms of the Mozilla Public
- License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/.
-->
<textarea bind:value={text} class="w-full h-full dark:text-black resize-none" />
{#if editor}
<textarea bind:value={data} class="w-full h-full dark:text-black resize-none" />
{:else}
<p>{data}</p>
{/if}