From 10c9abf1d2d3a1ff34a8157d9108b8cb65ef7a53 Mon Sep 17 00:00:00 2001 From: Nathan Vasse Date: Fri, 16 Feb 2024 15:03:04 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(demo)=20add=20delete=20confirmation?= =?UTF-8?q?=20modal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We want to showcase pre built modals in the demo. --- apps/demo/src/Home.tsx | 9 +++++++-- packages/react/src/index.ts | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/demo/src/Home.tsx b/apps/demo/src/Home.tsx index 83a51a2..3fedc3b 100644 --- a/apps/demo/src/Home.tsx +++ b/apps/demo/src/Home.tsx @@ -6,13 +6,14 @@ import { usePagination, useToastProvider, VariantType, + useModals, } from "@openfun/cunningham-react"; - import { PageProps } from "./App"; import { database } from "./Character"; export const Home = ({ modal }: { modal: PageProps }) => { const { toast } = useToastProvider(); + const modals = useModals(); const [rowSelection, setRowSelection] = useState({}); const [isLoading, setIsLoading] = useState(true); const pagination = usePagination({ defaultPage: 1 }); @@ -127,7 +128,11 @@ export const Home = ({ modal }: { modal: PageProps }) => {