diff --git a/src/routes/components/Modal.tsx b/src/routes/components/Modal.tsx index ac241e970..c52f07aa3 100644 --- a/src/routes/components/Modal.tsx +++ b/src/routes/components/Modal.tsx @@ -2,11 +2,10 @@ import { Category, ComponentHeader } from "@components/component-header/Componen import { GoabBadge, GoabButton, - GoabButtonGroup, GoabModal, GoabModalProps, GoabTab, - GoabTabs + GoabTabs, } from "@abgov/react-components"; import { ComponentBinding, Sandbox } from "@components/sandbox"; import { useContext, useEffect, useState } from "react"; @@ -25,7 +24,8 @@ import { AccessibilityEmpty } from "@components/empty-states/accessibility-empty // == Page props == -const FIGMA_LINK = "https://www.figma.com/design/3pb2IK8s2QUqWieH79KdN7/%E2%9D%96-Component-library-%7C-DDD?node-id=622-13874"; +const FIGMA_LINK = + "https://www.figma.com/design/3pb2IK8s2QUqWieH79KdN7/%E2%9D%96-Component-library-%7C-DDD?node-id=622-13874"; const componentName = "Modal"; const description = "An overlay that appears in front of all other content, and requires a user to take an action before continuing."; @@ -41,9 +41,9 @@ type CastingType = { }; export default function ModalPage() { - const {language} = useContext(LanguageVersionContext); + const { language } = useContext(LanguageVersionContext); const [componentProps, setComponentProps] = useState({ - heading: "Are you sure you want to exit your application?", + heading: "This is important information", }); useEffect(() => { @@ -72,7 +72,7 @@ export default function ModalPage() { type: "string", name: "heading", width: "40ch", - value: "Are you sure you want to exit your application?", + value: "This is important information", }, { label: "Max width", @@ -81,12 +81,6 @@ export default function ModalPage() { width: "16ch", value: "", }, - { - label: "Closable", - type: "boolean", - name: "closable", - value: false, - }, { label: "Open", type: "boolean", @@ -271,83 +265,50 @@ export default function ModalPage() { -

Playground

+

+ Playground +

- - {isClosableChecked(componentBindings) && } - - - {isClosableChecked(componentBindings) && } + /> setOpen(true)}>Show Modal - {!isClosableChecked(componentBindings) && ( - -

Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia obcaecati id - molestiae, natus dicta, eaque qui iusto similique, libero explicabo eligendi eius - laboriosam! Repellendus ducimus officia asperiores. Eos, eius numquam.

- - setOpen(false)}> - Cancel - - setOpen(false)}> - Exit - - -
- )} - - {isClosableChecked(componentBindings) && ( - -

Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia obcaecati id + +

+ Lorem ipsum dolor sit amet consectetur adipisicing elit. Mollitia obcaecati id molestiae, natus dicta, eaque qui iusto similique, libero explicabo eligendi eius - laboriosam! Repellendus ducimus officia asperiores. Eos, eius numquam.

-
- )} + laboriosam! Repellendus ducimus officia asperiores. Eos, eius numquam. +

+

+ See the Examples tab for customized closing buttons and behavior using the + "actions" property. +

+
- +
- } - > + }>