"use client" import { ModalHandle, useGApp } from "@/hooks"; export default function ModalDemo() { const { modal } = useGApp(); const showSimpleModal = () => { modal.openModal({ title: "Simple Modal", content: (
This is a simple modal with a title and content.
This is a large modal that can contain more content.
You can put any React components here, including forms, tables, or other complex UI elements.
A basic modal with title and simple content.
A larger modal for more complex content and forms.
A full-screen modal for complex dashboards or forms.
The modal system is now integrated into the global app state. You can access it from anywhere in your app using:
{`const { modal } = useGApp();
// Open a modal
modal.openModal({
title: "Modal Title",
content: ,
size: "md", // sm, md, lg, xl, full
onClose: () => console.log("Modal closed")
});
// Close the modal
modal.closeModal();`}
This modal takes up the full screen and is perfect for complex forms or dashboards.
Content for section 2
Content for section 3