From 25e908824c654e3ccb2ee50be94cb790e7918dc8 Mon Sep 17 00:00:00 2001 From: Darginec05 Date: Fri, 19 Jul 2024 00:42:14 +0200 Subject: [PATCH] add example for multi page editors --- .../CheckSourceCode/CheckSourceCode.tsx | 8 +- .../examples/withBaseFullSetup/initValue.ts | 178 +++++------- .../withMultiPageEditors/EveryPageContent.tsx | 140 +++++++++ .../examples/withMultiPageEditors/db.json | 267 ++++++++++++++++++ .../examples/withMultiPageEditors/index.tsx | 127 ++------- web/next-example/src/components/ui/sheet.tsx | 33 ++- .../src/pages/examples/[example].tsx | 8 +- .../examples/withMultiPageEditors/[page].tsx | 31 ++ 8 files changed, 561 insertions(+), 231 deletions(-) create mode 100644 web/next-example/src/components/examples/withMultiPageEditors/EveryPageContent.tsx create mode 100644 web/next-example/src/components/examples/withMultiPageEditors/db.json create mode 100644 web/next-example/src/pages/examples/withMultiPageEditors/[page].tsx diff --git a/web/next-example/src/components/CheckSourceCode/CheckSourceCode.tsx b/web/next-example/src/components/CheckSourceCode/CheckSourceCode.tsx index ced04dc9f..25073c934 100644 --- a/web/next-example/src/components/CheckSourceCode/CheckSourceCode.tsx +++ b/web/next-example/src/components/CheckSourceCode/CheckSourceCode.tsx @@ -1,10 +1,11 @@ import { ExternalLinkIcon, StarIcon } from 'lucide-react'; type Props = { - example: string; + example?: string; + directLink?: string; }; -const CheckSourceCode = ({ example }: Props) => { +const CheckSourceCode = ({ example, directLink }: Props) => { return (