From 5a0e625a3c77c9c769a6e036787c1e29a8d66a50 Mon Sep 17 00:00:00 2001 From: SySagar Date: Sun, 12 Jan 2025 23:33:26 +0530 Subject: [PATCH] chore(modal): story for login modal --- .../ui/lib/components/Modal/Modal.stories.tsx | 268 ++++++++++-------- 1 file changed, 146 insertions(+), 122 deletions(-) diff --git a/apps/ui/lib/components/Modal/Modal.stories.tsx b/apps/ui/lib/components/Modal/Modal.stories.tsx index 0bf282d..bc4b8ac 100644 --- a/apps/ui/lib/components/Modal/Modal.stories.tsx +++ b/apps/ui/lib/components/Modal/Modal.stories.tsx @@ -1,149 +1,173 @@ import { - Dialog, - DialogTrigger, - DialogContent, - DialogHeader, - DialogFooter, - DialogTitle, - DialogDescription, - DialogClose, + Dialog, + DialogTrigger, + DialogContent, + DialogHeader, + DialogFooter, + DialogTitle, + DialogDescription, + DialogClose, } from './Modal'; import { Text } from '../Typography'; import { Button } from '../Button'; import { Label } from '../Label'; import { TextField } from '../Textfield'; import { withGlobalStyles } from '../../../.storybook/decorator'; +import { useState } from 'react'; +import { Eye, EyeOff, Lock, Mail } from 'lucide-react'; export default { - title: 'Components/Modal', - component: Dialog, - decorators: [withGlobalStyles], + title: 'Components/Modal', + component: Dialog, + decorators: [withGlobalStyles], }; const BasicDialog = () => ( - - - - - - - - - Dialog Title - - This is a description for the dialog content. - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam pulvinar - risus non rikus. - - - + + + + + + + + + Dialog Title + + This is a description for the dialog content. + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam pulvinar + risus non rikus. + + + ); export const Basic = () => ; const ModalWithFooter = () => ( - - - - - - - - - Dialog Title - - This is a description for the dialog content. - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam pulvinar - risus non rikus. - - - - - - - + + + + + + + + + Dialog Title + + This is a description for the dialog content. + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam pulvinar + risus non rikus. + + + + + + + ); export const WithFooter = () => ; const ModalWithImage = () => ( - - - - - - - - Hello 2025 - - - - Random Image - - - Wish you a very happy new year. May this year bring you joy and - happiness. - - - + + + + + + + + Hello 2025 + + + + Random Image + + + Wish you a very happy new year. May this year bring you joy and + happiness. + + + ); export const WithImage = () => ; -const LoginModal = () => ( - - - - - - - - Login - - Please enter your credentials to login. - - -
-
- - -
-
- - -
- -
-
-
-); +export const LoginModal = { + render: () => { + const [showPassword, setShowPassword] = useState(false); + return ( + + + + + + + + Login + + Please enter your credentials to login. + + +
+
+ + + + + + + + Please enter a valid email address + + +
+
+ + + + + + + + + + +
+ +
+
+
+ ) + } +}; -export const Login = () => ;