Skip to content
Source
Sign inSign up
fuko/trytanstackdb-v2
Open History to see the last commit

editor-screen.tsx

50 lines1.5 KB

1import { Ellipsis, ListChecks, Paperclip, PenTool, Share } from "lucide-react";
2​
3import type { Note } from "@/fixtures";
4​
5import { NoteContent } from "../note-content";
6import { BackLink, ComposeButton, GlassPill, GlassPillButton, IosScreen } from "./ui";
7​
8export function IosEditorScreen({ folderId, note }: { folderId: string; note: Note | undefined }) {
9 return (
10 <IosScreen
11 background="plain"
12 leading={<BackLink to="/folders/$folderId" params={{ folderId }} aria-label="Back to list" />}
13 trailing={
14 <GlassPill>
15 <GlassPillButton aria-label="Share">
16 <Share />
17 </GlassPillButton>
18 <GlassPillButton aria-label="More">
19 <Ellipsis />
20 </GlassPillButton>
21 </GlassPill>
22 }
23 bottom={
24 <>
25 <GlassPill className="h-12 gap-1 px-3">
26 <GlassPillButton aria-label="Checklist">
27 <ListChecks />
28 </GlassPillButton>
29 <GlassPillButton aria-label="Attach">
30 <Paperclip />
31 </GlassPillButton>
32 <GlassPillButton aria-label="Markup">
33 <PenTool />
34 </GlassPillButton>
35 </GlassPill>
36 <span className="flex-1" />
37 <ComposeButton />
38 </>
39 }
40 >
41 <div className="px-2 pt-1">
42 {note ? (
43 <NoteContent note={note} variant="ios" />
44 ) : (
45 <p className="pt-16 text-center text-[17px] text-ios-secondary">Note not found</p>
46 )}
47 </div>
48 </IosScreen>
49 );