poder elegir página nueva en PagePicker
This commit is contained in:
parent
ad66044607
commit
5b4d9ffa51
1 changed files with 3 additions and 0 deletions
|
@ -6,6 +6,7 @@
|
||||||
import { schema } from "../editor/schema";
|
import { schema } from "../editor/schema";
|
||||||
import { makeYdocStore } from "../lib/makeYdocStore";
|
import { makeYdocStore } from "../lib/makeYdocStore";
|
||||||
import { lastUpdated } from "../lib/lastUpdated";
|
import { lastUpdated } from "../lib/lastUpdated";
|
||||||
|
import { nanoid } from "nanoid";
|
||||||
|
|
||||||
type Entry = {
|
type Entry = {
|
||||||
id: string;
|
id: string;
|
||||||
|
@ -54,6 +55,8 @@
|
||||||
|
|
||||||
<input type="text" bind:value={filter} placeholder="Buscar..." autofocus />
|
<input type="text" bind:value={filter} placeholder="Buscar..." autofocus />
|
||||||
<ul>
|
<ul>
|
||||||
|
<button type="button" on:click={() => onChoose(nanoid())}>Página nueva</button
|
||||||
|
>
|
||||||
{#each sortedEntries as entry}
|
{#each sortedEntries as entry}
|
||||||
<li>
|
<li>
|
||||||
<button type="button" on:click={() => onChoose(entry.id)}
|
<button type="button" on:click={() => onChoose(entry.id)}
|
||||||
|
|
Loading…
Reference in a new issue