diff --git a/apps/www/app/playground/page.tsx b/apps/www/app/playground/page.tsx index 85c2bb0..45f51f2 100644 --- a/apps/www/app/playground/page.tsx +++ b/apps/www/app/playground/page.tsx @@ -1,6 +1,6 @@ "use client"; -import React from "react"; +import React, { useState } from "react"; import Card from "@/components/ui/card"; import { ModeToggle } from "@/components/ui/ModeToggle"; import { @@ -40,8 +40,16 @@ import { selectAnimationVariants, } from "ruru-ui/components/select"; import AnimationToggle from "@/components/animationToggle"; +import Modal, { ModalProvider } from "ruru-ui/components/modal"; const Playground = () => { + const handleSubmit = async () => { + // Your submit logic here + console.log("Submitted"); + // Simulate an API call or any async operation + await new Promise((resolve) => setTimeout(resolve, 1000)); + }; + return (
\n {children}\n
\n);\n\n\nModal.Content = ({\n children,\n className,\n ...props\n}: DivProps): React.ReactElement => (\n\n {children}\n
\n);\n\n\nModal.Actions = ({\n children,\n className,\n ...props\n}: DivProps): React.ReactElement => (\n+ {children} +
+); + +/** + * Represents the Modal component. + * + * @param {DivProps} props - The props for the Modal component. + * @returns {React.ReactElement} + */ +Modal.Content = ({ + children, + className, + ...props +}: DivProps): React.ReactElement => ( ++ {children} +
+); + +/** + * Represents the Modal component. + * + * @param {DivProps} props - The props for the Modal component. + * @returns {React.ReactElement} + */ +Modal.Actions = ({ + children, + className, + ...props +}: DivProps): React.ReactElement => ( +