22 lines
633 B
Svelte
22 lines
633 B
Svelte
<script lang="ts">
|
|
import Editor from '$lib/components/editor/index.svelte'
|
|
import { today } from '$lib/date'
|
|
let { date = $bindable(today()) } = $props();
|
|
|
|
let edit = $state(false);
|
|
</script>
|
|
|
|
{#if edit}
|
|
<Editor newEntryDate={date} edit={true}/>
|
|
{:else}
|
|
<div class="flex flex-col items-center justify-center">
|
|
<button
|
|
class="bg-white/20 p-4 rounded-xl w-full hover:brightness-80 transition-all"
|
|
onclick={() => edit = true}
|
|
>
|
|
<p class="rounded-full bg-white/30 p-2 h-10 w-10">+</p>
|
|
<p>Add Entry for {date}</p>
|
|
</button>
|
|
</div>
|
|
{/if}
|