|
1 | 1 | import { MyHeading, MyText, MyTitle, Code, ListComponent } from '@/documentation/components' |
2 | 2 | import { |
3 | 3 | ModalAlertDemo, |
| 4 | + ModalCardDemo, |
4 | 5 | ModalDemo, |
5 | 6 | ModalMultipleDemo, |
| 7 | + ModalSimpleDemo, |
6 | 8 | } from '@/documentation/components/Organisms/Modals' |
7 | 9 |
|
8 | 10 | export const ViewModals = (): JSX.Element => { |
@@ -52,6 +54,77 @@ export function View(){ |
52 | 54 | </ModalContent> |
53 | 55 | </Modal> |
54 | 56 | ) |
| 57 | +}`} |
| 58 | + /> |
| 59 | + <MyTitle>Tipo ModalSimple</MyTitle> |
| 60 | + <MyText> |
| 61 | + Es una variante mínima del modal para casos donde solo necesitas contenido libre y la acción |
| 62 | + de cierre. No renderiza la banda azul ni título, y mantiene la <strong>X</strong> como |
| 63 | + control principal junto con las props base del modal. |
| 64 | + </MyText> |
| 65 | + <MyText>El componente se importa de la siguiente manera:</MyText> |
| 66 | + <Code text="import { ModalSimple } from '@eclass/ui-kit'" /> |
| 67 | + <ListComponent> |
| 68 | + <ModalSimpleDemo /> |
| 69 | + </ListComponent> |
| 70 | + <Code |
| 71 | + text={` |
| 72 | +import { ModalSimple } from '@eclass/ui-kit' |
| 73 | +import { useDisclosure } from '@chakra-ui/react' |
| 74 | +
|
| 75 | +export function View(){ |
| 76 | + const { isOpen, onOpen, onClose } = useDisclosure() |
| 77 | +
|
| 78 | + return ( |
| 79 | + <> |
| 80 | + <BtnPrimary onClick={onOpen}>Abrir ModalSimple</BtnPrimary> |
| 81 | + <ModalSimple |
| 82 | + isOpen={isOpen} |
| 83 | + onClose={onClose} |
| 84 | + > |
| 85 | + <p>Contenido libre del modal...</p> |
| 86 | + </ModalSimple> |
| 87 | + </> |
| 88 | + ) |
| 89 | +}`} |
| 90 | + /> |
| 91 | + <MyTitle>Tipo ModalCard</MyTitle> |
| 92 | + <MyText> |
| 93 | + Es una variante pensada para contenido tipo card, como logros o medallas. No renderiza |
| 94 | + iconos ni encabezado por defecto, mantiene la <strong>X</strong> para cerrar y permite |
| 95 | + contenido completamente libre. Su ancho está pensado para cards compactas. |
| 96 | + </MyText> |
| 97 | + <MyText>El componente se importa de la siguiente manera:</MyText> |
| 98 | + <Code text="import { ModalCard, ModalCardContent, ModalAlertButtons } from '@eclass/ui-kit'" /> |
| 99 | + <ListComponent> |
| 100 | + <ModalCardDemo /> |
| 101 | + </ListComponent> |
| 102 | + <Code |
| 103 | + text={` |
| 104 | +import { ModalCard, ModalCardContent, ModalAlertButtons, BtnLink } from '@eclass/ui-kit' |
| 105 | +import { useDisclosure } from '@chakra-ui/react' |
| 106 | +
|
| 107 | +export function View(){ |
| 108 | + const { isOpen, onOpen, onClose } = useDisclosure() |
| 109 | +
|
| 110 | + return ( |
| 111 | + <> |
| 112 | + <BtnPrimary onClick={onOpen}>Abrir ModalCard</BtnPrimary> |
| 113 | + <ModalCard |
| 114 | + isOpen={isOpen} |
| 115 | + onClose={onClose} |
| 116 | + > |
| 117 | + <ModalCardContent> |
| 118 | + <div>Contenido libre del card...</div> |
| 119 | + </ModalCardContent> |
| 120 | + <ModalAlertButtons> |
| 121 | + <BtnLink as="button" onClick={onClose}> |
| 122 | + Entendido |
| 123 | + </BtnLink> |
| 124 | + </ModalAlertButtons> |
| 125 | + </ModalCard> |
| 126 | + </> |
| 127 | + ) |
55 | 128 | }`} |
56 | 129 | /> |
57 | 130 | <MyTitle>Variantes del tipo Modal</MyTitle> |
|
0 commit comments