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 = () => ( - - - Open Dialog - - - - - - Dialog Title - - This is a description for the dialog content. - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam pulvinar - risus non rikus. - - - + + + Open Dialog + + + + + + 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 = () => ( - - - Open Dialog - - - - - - Dialog Title - - This is a description for the dialog content. - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam pulvinar - risus non rikus. - - - - Save - - - + + + Open Dialog + + + + + + Dialog Title + + This is a description for the dialog content. + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam pulvinar + risus non rikus. + + + + Save + + + ); export const WithFooter = () => ; const ModalWithImage = () => ( - - - Open Greeting Card - - - - - Hello 2025 - - - - - - - Wish you a very happy new year. May this year bring you joy and - happiness. - - - + + + Open Greeting Card + + + + + Hello 2025 + + + + + + + Wish you a very happy new year. May this year bring you joy and + happiness. + + + ); export const WithImage = () => ; -const LoginModal = () => ( - - - Login - - - - - Login - - Please enter your credentials to login. - - - - - - Email - - - - - - Password - - - - - Login - - - - -); +export const LoginModal = { + render: () => { + const [showPassword, setShowPassword] = useState(false); + return ( + + + Login + + + + + Login + + Please enter your credentials to login. + + + + + + Email + + + + + + + + Please enter a valid email address + + + + + + Password + + + + + + + + setShowPassword(!showPassword)} + > + {showPassword ? ( + + ) : ( + + )} + + + + + + Login + + + + + ) + } +}; -export const Login = () => ;