diff --git a/public/images/details-demo.jpg b/public/images/details-demo.jpg new file mode 100644 index 000000000..c4f164cc1 Binary files /dev/null and b/public/images/details-demo.jpg differ diff --git a/src/App.tsx b/src/App.tsx index 898b33599..d52786290 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -14,6 +14,7 @@ import FormStepperPage from "./routes/components/FormStepper"; import CheckboxPage from "./routes/components/Checkbox"; import BadgePage from "./routes/components/Badge"; +import DetailsPage from "./routes/components/Details"; import ListPage from "@routes/components/List"; import PopoverPage from "./routes/components/Popover"; import ContainerPage from "@routes/components/Container"; @@ -82,6 +83,7 @@ const router = createBrowserRouter( } /> } /> } /> + } /> } /> } /> } />ß diff --git a/src/components/component-card/ComponentCard.css b/src/components/component-card/ComponentCard.css index cdbdcf634..42d721a41 100644 --- a/src/components/component-card/ComponentCard.css +++ b/src/components/component-card/ComponentCard.css @@ -17,5 +17,7 @@ } .card-content a { + font-size: var(--goa-font-size-7); + display: block; margin-bottom: 1rem; } diff --git a/src/routes/components/Details.tsx b/src/routes/components/Details.tsx new file mode 100644 index 000000000..b895caebf --- /dev/null +++ b/src/routes/components/Details.tsx @@ -0,0 +1,218 @@ +import {useState} from "react"; +import { + ComponentProperties, + ComponentProperty, +} from "@components/component-properties/ComponentProperties.tsx"; +import {ComponentBinding, Sandbox} from "@components/sandbox"; +import {Category, ComponentHeader} from "@components/component-header/ComponentHeader.tsx"; +import { + GoABadge, + GoABlock, + GoADetails, + GoAFormItem, + GoAInput, + GoARadioGroup, + GoARadioItem, + GoATab, + GoATabs, +} from "@abgov/react-components"; + +export default function DetailsPage() { + const [detailsProps, setDetailsProps] = useState({ + heading: "Detail Heading", + }); + const [detailsBindings, setDetailsBindings] = useState([ + { + label: "Heading", + type: "string", + name: "heading", + value: "Detail Heading", + }, + ]); + + const componentProperties: ComponentProperty[] = [ + { + name: "heading", + type: "string", + required: true, + description: "The title heading", + }, + { + name: "open", + type: "boolean", + description: "Controls if details is expanded or not", + defaultValue: "false", + }, + ]; + + function onSandboxChange(bindings: ComponentBinding[], props: Record) { + setDetailsProps(props as {heading: string; [key: string]: unknown}); + setDetailsBindings(bindings); + } + + const noop = () => {}; + + return ( + <> + + + + + + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nunc vel lacinia metus, sed + sodales lectus. Aliquam sed volutpat velit. Sed in lacus ut dui placerat accumsan + malesuada quis erat. Aenean mi diam, rhoncus vitae justo eu, venenatis maximus nunc. + In vel est commodo, porttitor sem vel, tincidunt ipsum. In hac habitasse platea + dictumst. Mauris varius mollis dui. Aenean ut dui eu arcu rutrum auctor. Curabitur + cursus velit vel libero sollicitudin tincidunt. Proin tincidunt, enim et ultrices + rhoncus, nibh leo imperdiet sapien, sed porttitor ipsum nulla non massa. Nulla + facilisi. + + + + {/*Component properties table*/} + + + {/* Examples*/} + + + Show more information for a basic question + + + Additional information to help a user understand and answer a question + + + Show more information to help a user fill out direct deposit information + + + +

+ Show more information for a basic question +

+ + + {}}> + + + + + + +

+ This question helps us better understand your situation and ensure that you receive + the right information and support. +

+
+
+ +

+ Additional information to help a user understand and answer a question +

+ + + + + + + + + + +
+ Examples of education expenses +
    +
  • Laptop and computer hardware
  • +
  • Computer apps and subscriptions
  • +
  • Home internet
  • +
  • Testing and exam fees
  • +
  • Work or school clothing, like work boots
  • +
+
+
+ Do not include +
    +
  • Tuition
  • +
  • Mandatory fees
  • +
  • Books and supplies
  • +
  • School association fees
  • +
+
+
+
+
+ +

+ Show more information to help a user fill out direct deposit information +

+ +

Direct deposit information

+

+ Find this information on your bank's website or on your personal cheques. Contact your + bank if you can't find this information. +

+ + + + + + + + + + + +

+ Below is an example of where you can find the required bank information on a + personal cheque. +

+ +
+
+
+ + + Design guidelines + + + }> +

Coming Soon

+
+
+ + ); +} diff --git a/src/routes/root.tsx b/src/routes/root.tsx index 9059cf3d8..3c9b1c37b 100644 --- a/src/routes/root.tsx +++ b/src/routes/root.tsx @@ -44,7 +44,7 @@ export default function Root() { feedbackUrl="https://github.com/GovAlta/ui-components/discussions" maxContentWidth={MAX_CONTENT_WIDTH} /> - + Get started Patterns and templates Components