@ilo-org/react 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.js +36 -0
- package/.storybook/main.js +28 -0
- package/.storybook/manager-head.html +7 -0
- package/.storybook/manager.js +6 -0
- package/.storybook/preview.tsx +33 -0
- package/.storybook/styles.scss +1 -0
- package/.storybook/theme.js +11 -0
- package/.turbo/turbo-build.log +513 -0
- package/.turbo/turbo-check.log +5 -0
- package/.turbo/turbo-test.log +1676 -0
- package/=6.4.0 +115 -0
- package/=7.21.4 +21 -0
- package/LICENSE +201 -0
- package/README.md +11 -0
- package/lib/index.esm.js +24 -0
- package/lib/index.esm.js.map +1 -0
- package/lib/index.js +24 -0
- package/lib/index.js.map +1 -0
- package/package.json +115 -0
- package/rollup.config.js +40 -0
- package/src/__tests__/Accordion.test.tsx +52 -0
- package/src/__tests__/Button.test.tsx +60 -0
- package/src/__tests__/Callout.test.tsx +41 -0
- package/src/__tests__/ContextMenu.test.tsx +19 -0
- package/src/__tests__/Dropdown.test.tsx +38 -0
- package/src/__tests__/Form.test.tsx +34 -0
- package/src/__tests__/Heading.test.tsx +51 -0
- package/src/__tests__/Hero.test.tsx +22 -0
- package/src/__tests__/Image.test.tsx +21 -0
- package/src/__tests__/LinkList.test.tsx +17 -0
- package/src/__tests__/List.test.tsx +37 -0
- package/src/__tests__/Loading.text.tsx +33 -0
- package/src/__tests__/Notification.test.tsx +39 -0
- package/src/__tests__/Pagination.test.tsx +58 -0
- package/src/__tests__/Profile.test.tsx +48 -0
- package/src/__tests__/ReadMore.test.tsx +42 -0
- package/src/__tests__/RichText.test.tsx +16 -0
- package/src/__tests__/SearchField.test.tsx +35 -0
- package/src/__tests__/TableOfContents.test.tsx +12 -0
- package/src/__tests__/Tag.test.tsx +10 -0
- package/src/components/Accordion/Accordion.args.ts +19 -0
- package/src/components/Accordion/Accordion.props.d.ts +39 -0
- package/src/components/Accordion/Accordion.tsx +70 -0
- package/src/components/Accordion/AccordionButton.props.d.ts +13 -0
- package/src/components/Accordion/AccordionButton.tsx +60 -0
- package/src/components/Accordion/AccordionItem.props.d.ts +25 -0
- package/src/components/Accordion/AccordionItem.tsx +33 -0
- package/src/components/Accordion/AccordionPanel.props.d.ts +20 -0
- package/src/components/Accordion/AccordionPanel.tsx +47 -0
- package/src/components/Accordion/index.ts +4 -0
- package/src/components/Button/Button.args.ts +353 -0
- package/src/components/Button/Button.props.d.ts +74 -0
- package/src/components/Button/Button.tsx +67 -0
- package/src/components/Button/index.ts +1 -0
- package/src/components/Callout/Callout.args.ts +64 -0
- package/src/components/Callout/Callout.props.d.ts +61 -0
- package/src/components/Callout/Callout.tsx +80 -0
- package/src/components/Callout/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.args.ts +22 -0
- package/src/components/Checkbox/Checkbox.props.d.ts +61 -0
- package/src/components/Checkbox/Checkbox.tsx +92 -0
- package/src/components/Checkbox/index.ts +1 -0
- package/src/components/ChoiceGroup/ChoiceGroup.args.ts +90 -0
- package/src/components/ChoiceGroup/ChoiceGroup.props.d.ts +57 -0
- package/src/components/ChoiceGroup/ChoiceGroup.tsx +42 -0
- package/src/components/ChoiceGroup/index.ts +1 -0
- package/src/components/Collapse/Collapse.props.d.ts +92 -0
- package/src/components/Collapse/Collapse.tsx +130 -0
- package/src/components/Collapse/index.ts +1 -0
- package/src/components/ContextMenu/ContextMenu.args.ts +62 -0
- package/src/components/ContextMenu/ContextMenu.props.d.ts +28 -0
- package/src/components/ContextMenu/ContextMenu.tsx +32 -0
- package/src/components/ContextMenu/index.ts +1 -0
- package/src/components/Credit/Credit.args.ts +14 -0
- package/src/components/Credit/Credit.props.d.ts +11 -0
- package/src/components/Credit/Credit.tsx +41 -0
- package/src/components/Credit/index.ts +1 -0
- package/src/components/DatePicker/DatePicker.args.ts +82 -0
- package/src/components/DatePicker/DatePicker.props.d.ts +68 -0
- package/src/components/DatePicker/DatePicker.tsx +119 -0
- package/src/components/DatePicker/index.ts +1 -0
- package/src/components/Dropdown/Dropdown.args.ts +220 -0
- package/src/components/Dropdown/Dropdown.props.d.ts +84 -0
- package/src/components/Dropdown/Dropdown.tsx +82 -0
- package/src/components/Dropdown/index.ts +1 -0
- package/src/components/Empty/Empty.args.ts +14 -0
- package/src/components/Empty/Empty.props.d.ts +6 -0
- package/src/components/Empty/Empty.tsx +16 -0
- package/src/components/Empty/index.ts +1 -0
- package/src/components/Fieldset/Fieldset.props.d.ts +36 -0
- package/src/components/Fieldset/Fieldset.tsx +90 -0
- package/src/components/Fieldset/index.ts +1 -0
- package/src/components/FileUpload/FileUpload.args.ts +62 -0
- package/src/components/FileUpload/FileUpload.props.d.ts +63 -0
- package/src/components/FileUpload/FileUpload.tsx +82 -0
- package/src/components/FileUpload/index.ts +1 -0
- package/src/components/Form/Form.args.ts +265 -0
- package/src/components/Form/Form.props.d.ts +84 -0
- package/src/components/Form/Form.tsx +83 -0
- package/src/components/Form/index.ts +1 -0
- package/src/components/FormElement/FormElement.props.d.ts +53 -0
- package/src/components/FormElement/FormElement.tsx +26 -0
- package/src/components/FormElement/index.ts +1 -0
- package/src/components/FormGroup/FormGroup.args.ts +84 -0
- package/src/components/FormGroup/FormGroup.props.d.ts +71 -0
- package/src/components/FormGroup/FormGroup.tsx +73 -0
- package/src/components/FormGroup/index.ts +1 -0
- package/src/components/GlobalProvider/GlobalProvider.props.d.ts +15 -0
- package/src/components/GlobalProvider/GlobalProvider.tsx +27 -0
- package/src/components/GlobalProvider/index.js +4 -0
- package/src/components/Heading/Heading.args.ts +46 -0
- package/src/components/Heading/Heading.props.d.ts +24 -0
- package/src/components/Heading/Heading.tsx +28 -0
- package/src/components/Heading/index.ts +1 -0
- package/src/components/Hero/Hero.args.ts +296 -0
- package/src/components/Hero/Hero.props.d.ts +29 -0
- package/src/components/Hero/Hero.tsx +35 -0
- package/src/components/Hero/HeroCard.props.d.ts +65 -0
- package/src/components/Hero/HeroCard.tsx +53 -0
- package/src/components/Hero/index.ts +2 -0
- package/src/components/Icon/Icon.args.ts +15 -0
- package/src/components/Icon/Icon.props.d.ts +16 -0
- package/src/components/Icon/Icon.tsx +25 -0
- package/src/components/Icon/index.ts +1 -0
- package/src/components/Image/Image.args.ts +35 -0
- package/src/components/Image/Image.props.d.ts +38 -0
- package/src/components/Image/Image.tsx +51 -0
- package/src/components/Image/index.ts +1 -0
- package/src/components/Input/Input.args.ts +139 -0
- package/src/components/Input/Input.props.d.ts +63 -0
- package/src/components/Input/Input.tsx +63 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/Link/Link.args.ts +36 -0
- package/src/components/Link/Link.props.d.ts +34 -0
- package/src/components/Link/Link.tsx +49 -0
- package/src/components/Link/index.ts +1 -0
- package/src/components/LinkList/LinkList.args.ts +193 -0
- package/src/components/LinkList/LinkList.props.d.ts +52 -0
- package/src/components/LinkList/LinkList.tsx +59 -0
- package/src/components/LinkList/index.ts +1 -0
- package/src/components/List/List.args.ts +38 -0
- package/src/components/List/List.props.d.ts +36 -0
- package/src/components/List/List.tsx +47 -0
- package/src/components/List/ListItem.props.d.ts +25 -0
- package/src/components/List/ListItem.tsx +23 -0
- package/src/components/List/index.ts +2 -0
- package/src/components/Loading/Loading.args.ts +55 -0
- package/src/components/Loading/Loading.props.d.ts +23 -0
- package/src/components/Loading/Loading.tsx +24 -0
- package/src/components/Loading/index.ts +1 -0
- package/src/components/Notification/Notification.args.ts +157 -0
- package/src/components/Notification/Notification.props.d.ts +67 -0
- package/src/components/Notification/Notification.tsx +78 -0
- package/src/components/Notification/index.ts +1 -0
- package/src/components/NumberPicker/NumberPicker.args.ts +58 -0
- package/src/components/NumberPicker/NumberPicker.props.d.ts +56 -0
- package/src/components/NumberPicker/NumberPicker.tsx +65 -0
- package/src/components/NumberPicker/index.ts +1 -0
- package/src/components/Pagination/Pagination.args.ts +43 -0
- package/src/components/Pagination/Pagination.props.d.ts +66 -0
- package/src/components/Pagination/Pagination.tsx +114 -0
- package/src/components/Pagination/index.ts +1 -0
- package/src/components/Profile/Profile.args.ts +58 -0
- package/src/components/Profile/Profile.props.d.ts +43 -0
- package/src/components/Profile/Profile.tsx +43 -0
- package/src/components/Profile/index.ts +1 -0
- package/src/components/Radio/Radio.args.ts +22 -0
- package/src/components/Radio/Radio.props.d.ts +61 -0
- package/src/components/Radio/Radio.tsx +64 -0
- package/src/components/Radio/index.ts +1 -0
- package/src/components/ReadMore/ReadMore.props.d.ts +38 -0
- package/src/components/ReadMore/ReadMore.tsx +55 -0
- package/src/components/ReadMore/index.ts +1 -0
- package/src/components/ReadMore/readMore.args.ts +35 -0
- package/src/components/RichText/RichText.props.d.ts +11 -0
- package/src/components/RichText/RichText.tsx +22 -0
- package/src/components/RichText/index.ts +1 -0
- package/src/components/RichText/richText.args.ts +15 -0
- package/src/components/SearchField/SearchField.args.ts +73 -0
- package/src/components/SearchField/SearchField.props.d.ts +35 -0
- package/src/components/SearchField/SearchField.tsx +55 -0
- package/src/components/SearchField/index.ts +1 -0
- package/src/components/TableOfContents/TableOfContents.args.ts +35 -0
- package/src/components/TableOfContents/TableOfContents.props.d.ts +23 -0
- package/src/components/TableOfContents/TableOfContents.tsx +32 -0
- package/src/components/TableOfContents/index.ts +1 -0
- package/src/components/Tag/Tag.args.ts +15 -0
- package/src/components/Tag/Tag.props.d.ts +34 -0
- package/src/components/Tag/Tag.tsx +99 -0
- package/src/components/Tag/TagSet.args.ts +39 -0
- package/src/components/Tag/TagSet.props.d.ts +36 -0
- package/src/components/Tag/TagSet.tsx +71 -0
- package/src/components/Tag/index.ts +2 -0
- package/src/components/Textarea/Textarea.args.ts +62 -0
- package/src/components/Textarea/Textarea.props.d.ts +71 -0
- package/src/components/Textarea/Textarea.tsx +67 -0
- package/src/components/Textarea/index.ts +1 -0
- package/src/components/Tooltip/Tooltip.args.ts +43 -0
- package/src/components/Tooltip/Tooltip.props.d.ts +48 -0
- package/src/components/Tooltip/Tooltip.tsx +139 -0
- package/src/components/Tooltip/index.ts +1 -0
- package/src/components/Video/Video.args.ts +81 -0
- package/src/components/Video/Video.props.d.ts +82 -0
- package/src/components/Video/Video.tsx +29 -0
- package/src/components/Video/VideoPlayer.props.d.ts +80 -0
- package/src/components/Video/VideoPlayer.tsx +285 -0
- package/src/components/Video/index.ts +1 -0
- package/src/hooks/useGlobalSettings.ts +13 -0
- package/src/hooks/useVideoPlayer.ts +85 -0
- package/src/index.ts +19 -0
- package/src/public/favicon.ico +0 -0
- package/src/public/index.html +43 -0
- package/src/public/logo192.png +0 -0
- package/src/public/logo512.png +0 -0
- package/src/public/manifest.json +25 -0
- package/src/public/robots.txt +3 -0
- package/src/setup.ts +6 -0
- package/src/stories/Accordion.stories.tsx +94 -0
- package/src/stories/Button.stories.tsx +491 -0
- package/src/stories/Callout.stories.tsx +154 -0
- package/src/stories/ContextMenu.stories.tsx +72 -0
- package/src/stories/Dropdown.stories.tsx +85 -0
- package/src/stories/Empty.stories.tsx +48 -0
- package/src/stories/Form.stories.tsx +67 -0
- package/src/stories/Heading.stories.tsx +191 -0
- package/src/stories/Hero.stories.tsx +129 -0
- package/src/stories/Image.stories.tsx +71 -0
- package/src/stories/Introduction.stories.mdx +12 -0
- package/src/stories/Link.stories.tsx +99 -0
- package/src/stories/LinkList.stories.tsx +68 -0
- package/src/stories/List.stories.tsx +246 -0
- package/src/stories/Loading.stories.tsx +103 -0
- package/src/stories/Notification.stories.tsx +154 -0
- package/src/stories/Pagination.stories.tsx +63 -0
- package/src/stories/Profile.stories.tsx +84 -0
- package/src/stories/ReadMore.stories.tsx +80 -0
- package/src/stories/RichText.stories.tsx +59 -0
- package/src/stories/SearchField.stories.tsx +87 -0
- package/src/stories/TableOfContents.stories.tsx +50 -0
- package/src/stories/Tag.stories.tsx +194 -0
- package/src/stories/Tooltip.stories.tsx +83 -0
- package/src/stories/Video.stories.tsx +69 -0
- package/src/stories/assets/code-brackets.svg +1 -0
- package/src/stories/assets/colors.svg +1 -0
- package/src/stories/assets/comments.svg +1 -0
- package/src/stories/assets/direction.svg +1 -0
- package/src/stories/assets/flow.svg +1 -0
- package/src/stories/assets/plugin.svg +1 -0
- package/src/stories/assets/repo.svg +1 -0
- package/src/stories/assets/stackalt.svg +1 -0
- package/src/types/index.ts +49 -0
- package/src/types/temp.d.ts +9 -0
- package/src/utils/checkArrayDuplicates.ts +3 -0
- package/src/utils/createChainedFunction.ts +31 -0
- package/src/utils/getDefaultDimensionValue.ts +28 -0
- package/src/utils/hoursMinutesSeconds.ts +8 -0
- package/src/utils/transitionEndListener.ts +29 -0
- package/src/utils/triggerBrowserReflow.ts +4 -0
- package/storybook-static/0.f9bb25299a048d2bb825.manager.bundle.js +2 -0
- package/storybook-static/0.f9bb25299a048d2bb825.manager.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/01daf23af61cc99e9d75.woff2 +0 -0
- package/storybook-static/06a2da828c8b6497ba7a.woff +0 -0
- package/storybook-static/0fa24adac56865ac7e5f.ttf +0 -0
- package/storybook-static/12ec02e7e66abaf38243.eot +0 -0
- package/storybook-static/164.8f6e5926.iframe.bundle.js +2 -0
- package/storybook-static/164.8f6e5926.iframe.bundle.js.LICENSE.txt +8 -0
- package/storybook-static/181.1d6d475b.iframe.bundle.js +1 -0
- package/storybook-static/1cc3364249fd0db446ad.ttf +0 -0
- package/storybook-static/1dbed2ef5cef8fcb4cbe.ttf +0 -0
- package/storybook-static/1fa1c16a4a45d13f0df8.ttf +0 -0
- package/storybook-static/23cdaa8575b5e003dcde.eot +0 -0
- package/storybook-static/248db78ddf1e3568728d.woff +0 -0
- package/storybook-static/27d33755a2b827666dc5.woff +0 -0
- package/storybook-static/29.8e0bc9a8.iframe.bundle.js +2 -0
- package/storybook-static/29.8e0bc9a8.iframe.bundle.js.LICENSE.txt +102 -0
- package/storybook-static/2ac1a95228cf06e17040.woff2 +0 -0
- package/storybook-static/337.b8defe66.iframe.bundle.js +2 -0
- package/storybook-static/337.b8defe66.iframe.bundle.js.LICENSE.txt +11 -0
- package/storybook-static/3579203659b1428de036.eot +0 -0
- package/storybook-static/36229f80a738c199462d.woff2 +0 -0
- package/storybook-static/409a9c398a28ee4d74ff.eot +0 -0
- package/storybook-static/431.8ab7c276.iframe.bundle.js +1 -0
- package/storybook-static/431.b32fed6077acc140df7c.manager.bundle.js +1 -0
- package/storybook-static/4bf5fc6f93ba10519c82.eot +0 -0
- package/storybook-static/51d7da3f5e58e3a24a84.woff +0 -0
- package/storybook-static/697.1f42ad69d33c2733c631.manager.bundle.js +1 -0
- package/storybook-static/697.9e56beef.iframe.bundle.js +1 -0
- package/storybook-static/6a159f0a2005668f1f78.woff +0 -0
- package/storybook-static/6f781753b674130d947a.ttf +0 -0
- package/storybook-static/70a240717e773fe567b3.woff2 +0 -0
- package/storybook-static/720.f44d4e1f5203b6083ae4.manager.bundle.js +1 -0
- package/storybook-static/730.1240c246.iframe.bundle.js +1 -0
- package/storybook-static/730.7223b772132e3e068755.manager.bundle.js +1 -0
- package/storybook-static/73ba1c910e0f7bfc6b18.woff2 +0 -0
- package/storybook-static/88739612501023fa15e3.woff +0 -0
- package/storybook-static/8a142c29a318c432117a.woff +0 -0
- package/storybook-static/914.8ddb80ae2badda1468b0.manager.bundle.js +2 -0
- package/storybook-static/914.8ddb80ae2badda1468b0.manager.bundle.js.LICENSE.txt +94 -0
- package/storybook-static/978.236a5d9d5736517b960e.manager.bundle.js +2 -0
- package/storybook-static/978.236a5d9d5736517b960e.manager.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/978.32e8032b.iframe.bundle.js +2 -0
- package/storybook-static/978.32e8032b.iframe.bundle.js.LICENSE.txt +12 -0
- package/storybook-static/9db5d05810cb98f2831f.ttf +0 -0
- package/storybook-static/9ff97e342523931a4992.eot +0 -0
- package/storybook-static/a40d436619020fb67db5.woff +0 -0
- package/storybook-static/a41d7e330757fb4b2125.woff2 +0 -0
- package/storybook-static/ab3494afe25b712485ed.woff +0 -0
- package/storybook-static/b53d0e74edc5a5fbef0a.ttf +0 -0
- package/storybook-static/b70a9c0ad8e8b43f5e6c.ttf +0 -0
- package/storybook-static/c12a83f816844ff94375.ttf +0 -0
- package/storybook-static/c5116d16544f932eba4b.eot +0 -0
- package/storybook-static/c807e115c00aaffbac11.woff2 +0 -0
- package/storybook-static/cadb6b94d6b0ecc3a86a.woff2 +0 -0
- package/storybook-static/d0cff1b064bcd84324fe.eot +0 -0
- package/storybook-static/d3434771ad7e9030387e.ttf +0 -0
- package/storybook-static/d8610c2a4fe5c177f4f6.woff +0 -0
- package/storybook-static/d970f426740b938f39e1.woff +0 -0
- package/storybook-static/d9c7eba773ff1c8df5bb.eot +0 -0
- package/storybook-static/dd4645bdb2f1e1a47ed7.woff2 +0 -0
- package/storybook-static/e0a63577ac642885f067.eot +0 -0
- package/storybook-static/e2625b8a1277972c9240.ttf +0 -0
- package/storybook-static/f469ea3aa8aacf7ad83a.eot +0 -0
- package/storybook-static/f632ebfa0d7b7085d542.woff2 +0 -0
- package/storybook-static/f93e2252d7112c3bcca5.woff2 +0 -0
- package/storybook-static/favicon.ico +0 -0
- package/storybook-static/iframe.html +348 -0
- package/storybook-static/index.html +59 -0
- package/storybook-static/main.01e6a863.iframe.bundle.js +1 -0
- package/storybook-static/main.dc406261155f1ebb44ce.manager.bundle.js +1 -0
- package/storybook-static/reactPlayerDailyMotion.469cc00f.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerFacebook.1423bb15.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerFilePlayer.e19e24a0.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerKaltura.d1eb0868.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerMixcloud.9f1b1691.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerPreview.9295696b.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerSoundCloud.d420395c.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerStreamable.9b655bf3.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerTwitch.e90e6dea.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerVidyard.a37ae6b3.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerVimeo.a7f367ee.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerWistia.fb351944.iframe.bundle.js +1 -0
- package/storybook-static/reactPlayerYouTube.3514e11a.iframe.bundle.js +1 -0
- package/storybook-static/runtime~main.012769eac0433a7ec083.manager.bundle.js +1 -0
- package/storybook-static/runtime~main.f3168ed5.iframe.bundle.js +1 -0
- package/storybook-static/static/css/main.3d116812.css +3 -0
- package/storybook-static/static/css/main.3d116812.css.map +1 -0
- package/tsconfig.build.json +15 -0
- package/tsconfig.json +7 -0
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import useGlobalSettings from "../../hooks/useGlobalSettings";
|
|
4
|
+
import { FormGroupProps } from "./FormGroup.props";
|
|
5
|
+
import { Checkbox } from "../Checkbox";
|
|
6
|
+
import { ChoiceGroup } from "../ChoiceGroup";
|
|
7
|
+
import { DatePicker } from "../DatePicker";
|
|
8
|
+
import { Dropdown } from "../Dropdown";
|
|
9
|
+
import { FileUpload } from "../FileUpload";
|
|
10
|
+
import { Input } from "../Input";
|
|
11
|
+
import { NumberPicker } from "../NumberPicker";
|
|
12
|
+
import { Textarea } from "../Textarea";
|
|
13
|
+
|
|
14
|
+
const FormGroup: FC<FormGroupProps> = ({
|
|
15
|
+
className,
|
|
16
|
+
formgroupid,
|
|
17
|
+
items,
|
|
18
|
+
legend,
|
|
19
|
+
type,
|
|
20
|
+
}) => {
|
|
21
|
+
const { prefix } = useGlobalSettings();
|
|
22
|
+
const baseClass = `${prefix}--formgroup`;
|
|
23
|
+
const formGroupClasses = classNames(className, {
|
|
24
|
+
[baseClass]: true,
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
return (
|
|
28
|
+
<fieldset
|
|
29
|
+
className={`${formGroupClasses} ${type}`}
|
|
30
|
+
id={formgroupid ? (formgroupid as any) : undefined}
|
|
31
|
+
>
|
|
32
|
+
{legend && <legend className={`${baseClass}--legend`}>{legend}</legend>}
|
|
33
|
+
{items.map((item, i) => {
|
|
34
|
+
if (item?.type === "input") {
|
|
35
|
+
return <Input {...(item?.field as any)} key={i} />;
|
|
36
|
+
}
|
|
37
|
+
if (item?.type === "dropdown") {
|
|
38
|
+
return <Dropdown {...(item?.field as any)} key={i} />;
|
|
39
|
+
}
|
|
40
|
+
if (item?.type === "checkbox" && Array.isArray(item?.field) === false) {
|
|
41
|
+
return <Checkbox {...(item?.field as any)} key={i} />;
|
|
42
|
+
}
|
|
43
|
+
if (
|
|
44
|
+
(item?.type === "checkbox" || item?.type === "radio") &&
|
|
45
|
+
Array.isArray(item?.field)
|
|
46
|
+
) {
|
|
47
|
+
return (
|
|
48
|
+
<ChoiceGroup
|
|
49
|
+
items={item?.field as any}
|
|
50
|
+
legend={item?.legend as any}
|
|
51
|
+
choicegroupid={item?.choicegroupid as any}
|
|
52
|
+
key={i}
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
if (item?.type === "file") {
|
|
57
|
+
return <FileUpload {...(item?.field as any)} key={i} />;
|
|
58
|
+
}
|
|
59
|
+
if (item?.type === "date") {
|
|
60
|
+
return <DatePicker {...(item?.field as any)} key={i} />;
|
|
61
|
+
}
|
|
62
|
+
if (item?.type === "number") {
|
|
63
|
+
return <NumberPicker {...(item?.field as any)} key={i} />;
|
|
64
|
+
}
|
|
65
|
+
if (item?.type === "textarea") {
|
|
66
|
+
return <Textarea {...(item?.field as any)} key={i} />;
|
|
67
|
+
}
|
|
68
|
+
})}
|
|
69
|
+
</fieldset>
|
|
70
|
+
);
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export default FormGroup;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as FormGroup } from "./FormGroup";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
export interface GlobalProviderContextProps {
|
|
4
|
+
/**
|
|
5
|
+
* Prefix classname to use across the components.
|
|
6
|
+
*/
|
|
7
|
+
prefix: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface GlobalProviderProps extends GlobalProviderContextProps {
|
|
11
|
+
/**
|
|
12
|
+
* Specify the content of nested under the global provider.
|
|
13
|
+
*/
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { createContext, FC } from "react";
|
|
2
|
+
import { themeprefix } from "@ilo-org/themes/tokens/theme/base.json";
|
|
3
|
+
import {
|
|
4
|
+
GlobalProviderProps,
|
|
5
|
+
GlobalProviderContextProps,
|
|
6
|
+
} from "./GlobalProvider.props";
|
|
7
|
+
|
|
8
|
+
export const GlobalProviderContext = createContext(
|
|
9
|
+
{} as GlobalProviderContextProps
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
const GlobalProvider: FC<GlobalProviderProps> = ({
|
|
13
|
+
prefix = themeprefix.value,
|
|
14
|
+
children,
|
|
15
|
+
}) => {
|
|
16
|
+
return (
|
|
17
|
+
<GlobalProviderContext.Provider
|
|
18
|
+
value={{
|
|
19
|
+
prefix,
|
|
20
|
+
}}
|
|
21
|
+
>
|
|
22
|
+
{children}
|
|
23
|
+
</GlobalProviderContext.Provider>
|
|
24
|
+
);
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default GlobalProvider;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { HeadingProps } from "./Heading.props";
|
|
2
|
+
|
|
3
|
+
const heading1: HeadingProps = {
|
|
4
|
+
children: "Heading 1",
|
|
5
|
+
level: "h1",
|
|
6
|
+
type: "actionable",
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
const heading2: HeadingProps = {
|
|
10
|
+
children: "Heading 2",
|
|
11
|
+
level: "h2",
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const heading3: HeadingProps = {
|
|
15
|
+
children: "Heading 3",
|
|
16
|
+
level: "h3",
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const heading4: HeadingProps = {
|
|
20
|
+
children: "Heading 4",
|
|
21
|
+
level: "h4",
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const heading5: HeadingProps = {
|
|
25
|
+
children: "Heading 5",
|
|
26
|
+
level: "h5",
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const heading6: HeadingProps = {
|
|
30
|
+
children: "Heading 6",
|
|
31
|
+
level: "h6",
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Sample prop definitions for Headings's enumerable properties (imported in stories and test)
|
|
36
|
+
*/
|
|
37
|
+
const HeadingArgs = {
|
|
38
|
+
heading1,
|
|
39
|
+
heading2,
|
|
40
|
+
heading3,
|
|
41
|
+
heading4,
|
|
42
|
+
heading5,
|
|
43
|
+
heading6,
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export default HeadingArgs;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
|
+
import { headingLevel, labelTypes } from "../../types";
|
|
3
|
+
|
|
4
|
+
export interface HeadingProps {
|
|
5
|
+
/**
|
|
6
|
+
* Specify the content of your heading.
|
|
7
|
+
*/
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Specify the heading level the heading. Default level is h3.
|
|
12
|
+
*/
|
|
13
|
+
level?: headingLevel;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Specify an optional className to be added to your heading.
|
|
17
|
+
*/
|
|
18
|
+
className?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Specify an optional color of Heading.
|
|
22
|
+
*/
|
|
23
|
+
type?: labelTypes;
|
|
24
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import useGlobalSettings from "../../hooks/useGlobalSettings";
|
|
4
|
+
import { HeadingProps } from "./Heading.props";
|
|
5
|
+
|
|
6
|
+
const Heading: FC<HeadingProps> = ({
|
|
7
|
+
level = "h3",
|
|
8
|
+
children,
|
|
9
|
+
className,
|
|
10
|
+
type,
|
|
11
|
+
...rest
|
|
12
|
+
}) => {
|
|
13
|
+
const { prefix } = useGlobalSettings();
|
|
14
|
+
const UseHeading = level;
|
|
15
|
+
const baseClass = `${prefix}--${level}`;
|
|
16
|
+
const headingClasses = classNames(className, {
|
|
17
|
+
[baseClass]: true,
|
|
18
|
+
[`${baseClass}--${type}`]: type,
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
return (
|
|
22
|
+
<UseHeading className={headingClasses} {...rest}>
|
|
23
|
+
{children}
|
|
24
|
+
</UseHeading>
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default Heading;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Heading } from "./Heading";
|
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { HeroProps } from "./Hero.props";
|
|
2
|
+
|
|
3
|
+
const articleCenteredHero: HeroProps = {
|
|
4
|
+
className: "storybook",
|
|
5
|
+
image: {
|
|
6
|
+
alt: "Alt tag",
|
|
7
|
+
className: "storybook",
|
|
8
|
+
url: [
|
|
9
|
+
{
|
|
10
|
+
breakpoint: 0,
|
|
11
|
+
src: "https://placekitten.com/1920/800",
|
|
12
|
+
},
|
|
13
|
+
{
|
|
14
|
+
breakpoint: 768,
|
|
15
|
+
src: "https://placekitten.com/1920/800",
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
},
|
|
19
|
+
heroCard: {
|
|
20
|
+
alignment: "center",
|
|
21
|
+
datecopy: "11 February 2021",
|
|
22
|
+
eyebrow: "Eyebrow Title",
|
|
23
|
+
intro:
|
|
24
|
+
"Brief intro text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
25
|
+
socials: [
|
|
26
|
+
{
|
|
27
|
+
label: "Facebook",
|
|
28
|
+
url: "https://www.facebook.com/",
|
|
29
|
+
icon: "facebook",
|
|
30
|
+
},
|
|
31
|
+
],
|
|
32
|
+
title:
|
|
33
|
+
"This is an centered aligned article headline that is more than two lines long",
|
|
34
|
+
theme: "light",
|
|
35
|
+
types: "article",
|
|
36
|
+
},
|
|
37
|
+
theme: "light",
|
|
38
|
+
types: "article",
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const articleHero: HeroProps = {
|
|
42
|
+
className: "storybook",
|
|
43
|
+
image: {
|
|
44
|
+
alt: "Alt tag",
|
|
45
|
+
className: "storybook",
|
|
46
|
+
url: [
|
|
47
|
+
{
|
|
48
|
+
breakpoint: 0,
|
|
49
|
+
src: "https://placekitten.com/1920/800",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
breakpoint: 768,
|
|
53
|
+
src: "https://placekitten.com/1920/800",
|
|
54
|
+
},
|
|
55
|
+
],
|
|
56
|
+
},
|
|
57
|
+
heroCard: {
|
|
58
|
+
alignment: "left",
|
|
59
|
+
datecopy: "11 February 2021",
|
|
60
|
+
eyebrow: "Eyebrow Title",
|
|
61
|
+
intro:
|
|
62
|
+
"Brief intro text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
63
|
+
socials: [
|
|
64
|
+
{
|
|
65
|
+
label: "Facebook",
|
|
66
|
+
url: "https://www.facebook.com/",
|
|
67
|
+
icon: "facebook",
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
title:
|
|
71
|
+
"This is an left aligned article headline that is more than two lines long",
|
|
72
|
+
theme: "light",
|
|
73
|
+
types: "article",
|
|
74
|
+
},
|
|
75
|
+
theme: "light",
|
|
76
|
+
types: "article",
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const articleNoImageHero: HeroProps = {
|
|
80
|
+
className: "storybook",
|
|
81
|
+
heroCard: {
|
|
82
|
+
alignment: "center",
|
|
83
|
+
datecopy: "11 February 2021",
|
|
84
|
+
eyebrow: "Eyebrow Title",
|
|
85
|
+
intro:
|
|
86
|
+
"Brief intro text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
87
|
+
socials: [
|
|
88
|
+
{
|
|
89
|
+
label: "Facebook",
|
|
90
|
+
url: "https://www.facebook.com/",
|
|
91
|
+
icon: "facebook",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
title:
|
|
95
|
+
"This is an center aligned article headline that is more than two lines long",
|
|
96
|
+
theme: "light",
|
|
97
|
+
types: "article",
|
|
98
|
+
},
|
|
99
|
+
theme: "light",
|
|
100
|
+
types: "article",
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const homeHero: HeroProps = {
|
|
104
|
+
className: "storybook",
|
|
105
|
+
image: {
|
|
106
|
+
alt: "Alt tag",
|
|
107
|
+
className: "storybook",
|
|
108
|
+
url: [
|
|
109
|
+
{
|
|
110
|
+
breakpoint: 0,
|
|
111
|
+
src: "https://placekitten.com/1920/800",
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
breakpoint: 768,
|
|
115
|
+
src: "https://placekitten.com/1920/800",
|
|
116
|
+
},
|
|
117
|
+
],
|
|
118
|
+
},
|
|
119
|
+
heroCard: {
|
|
120
|
+
alignment: "left",
|
|
121
|
+
eyebrow: "Eyebrow Title",
|
|
122
|
+
title:
|
|
123
|
+
"ILO welcomes G7 call to make a just transition to a green economy happen",
|
|
124
|
+
theme: "dark",
|
|
125
|
+
types: "home",
|
|
126
|
+
},
|
|
127
|
+
theme: "dark",
|
|
128
|
+
types: "home",
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
const portalHero: HeroProps = {
|
|
132
|
+
className: "storybook",
|
|
133
|
+
image: {
|
|
134
|
+
alt: "Alt tag",
|
|
135
|
+
className: "storybook",
|
|
136
|
+
url: [
|
|
137
|
+
{
|
|
138
|
+
breakpoint: 0,
|
|
139
|
+
src: "https://placekitten.com/1920/800",
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
breakpoint: 768,
|
|
143
|
+
src: "https://placekitten.com/1920/800",
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
147
|
+
heroCard: {
|
|
148
|
+
alignment: "left",
|
|
149
|
+
eyebrow: "Eyebrow Title",
|
|
150
|
+
socials: [
|
|
151
|
+
{
|
|
152
|
+
label: "Facebook",
|
|
153
|
+
url: "https://www.facebook.com/",
|
|
154
|
+
icon: "facebook",
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
label: "Linkedin",
|
|
158
|
+
url: "https://www.linkedin.com/",
|
|
159
|
+
icon: "linkedin",
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
title: "This is a page title",
|
|
163
|
+
theme: "dark",
|
|
164
|
+
types: "portal",
|
|
165
|
+
},
|
|
166
|
+
theme: "dark",
|
|
167
|
+
types: "portal",
|
|
168
|
+
};
|
|
169
|
+
|
|
170
|
+
const projectHero: HeroProps = {
|
|
171
|
+
className: "storybook",
|
|
172
|
+
image: {
|
|
173
|
+
alt: "Alt tag",
|
|
174
|
+
className: "storybook",
|
|
175
|
+
url: [
|
|
176
|
+
{
|
|
177
|
+
breakpoint: 0,
|
|
178
|
+
src: "https://placekitten.com/1920/800",
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
breakpoint: 768,
|
|
182
|
+
src: "https://placekitten.com/1920/800",
|
|
183
|
+
},
|
|
184
|
+
],
|
|
185
|
+
},
|
|
186
|
+
heroCard: {
|
|
187
|
+
alignment: "center",
|
|
188
|
+
eyebrow: "Eyebrow Title",
|
|
189
|
+
datecopy: "Date | Duration",
|
|
190
|
+
intro:
|
|
191
|
+
"Brief intro text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
192
|
+
socials: [
|
|
193
|
+
{
|
|
194
|
+
label: "Facebook",
|
|
195
|
+
url: "https://www.facebook.com/",
|
|
196
|
+
icon: "facebook",
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
title: "This is a page title",
|
|
200
|
+
theme: "dark",
|
|
201
|
+
types: "project",
|
|
202
|
+
},
|
|
203
|
+
theme: "dark",
|
|
204
|
+
types: "project",
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
const graphicHero: HeroProps = {
|
|
208
|
+
className: "storybook",
|
|
209
|
+
image: {
|
|
210
|
+
alt: "Alt tag",
|
|
211
|
+
className: "storybook",
|
|
212
|
+
url: [
|
|
213
|
+
{
|
|
214
|
+
breakpoint: 0,
|
|
215
|
+
src: "https://placekitten.com/1920/800",
|
|
216
|
+
},
|
|
217
|
+
{
|
|
218
|
+
breakpoint: 768,
|
|
219
|
+
src: "https://placekitten.com/1920/800",
|
|
220
|
+
},
|
|
221
|
+
],
|
|
222
|
+
},
|
|
223
|
+
heroCard: {
|
|
224
|
+
alignment: "center",
|
|
225
|
+
eyebrow: "Eyebrow Title",
|
|
226
|
+
datecopy: "Date | Duration",
|
|
227
|
+
intro:
|
|
228
|
+
"Brief intro text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
229
|
+
socials: [
|
|
230
|
+
{
|
|
231
|
+
label: "Facebook",
|
|
232
|
+
url: "https://www.facebook.com/",
|
|
233
|
+
icon: "facebook",
|
|
234
|
+
},
|
|
235
|
+
],
|
|
236
|
+
title: "This is a centered graphic article headline that is two lines long",
|
|
237
|
+
theme: "light",
|
|
238
|
+
types: "graphic",
|
|
239
|
+
},
|
|
240
|
+
theme: "light",
|
|
241
|
+
types: "graphic",
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
const publicationHero: HeroProps = {
|
|
245
|
+
className: "storybook",
|
|
246
|
+
image: {
|
|
247
|
+
alt: "Alt tag",
|
|
248
|
+
caption: "This is a caption",
|
|
249
|
+
className: "storybook",
|
|
250
|
+
credit: "Credit Here",
|
|
251
|
+
url: [
|
|
252
|
+
{
|
|
253
|
+
breakpoint: 0,
|
|
254
|
+
src: "https://placekitten.com/1920/800",
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
breakpoint: 768,
|
|
258
|
+
src: "https://placekitten.com/1920/800",
|
|
259
|
+
},
|
|
260
|
+
],
|
|
261
|
+
},
|
|
262
|
+
heroCard: {
|
|
263
|
+
alignment: "left",
|
|
264
|
+
eyebrow: "Eyebrow Title",
|
|
265
|
+
datecopy: "Date | Duration",
|
|
266
|
+
intro:
|
|
267
|
+
"Brief intro text - ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
|
|
268
|
+
socials: [
|
|
269
|
+
{
|
|
270
|
+
label: "Facebook",
|
|
271
|
+
url: "https://www.facebook.com/",
|
|
272
|
+
icon: "facebook",
|
|
273
|
+
},
|
|
274
|
+
],
|
|
275
|
+
title: "This is a page title",
|
|
276
|
+
theme: "light",
|
|
277
|
+
types: "publication",
|
|
278
|
+
},
|
|
279
|
+
theme: "light",
|
|
280
|
+
types: "publication",
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* Sample prop definitions for Hero's enumerable properties (imported in stories and test)
|
|
284
|
+
*/
|
|
285
|
+
const HeroArgs = {
|
|
286
|
+
articleHero,
|
|
287
|
+
articleCenteredHero,
|
|
288
|
+
articleNoImageHero,
|
|
289
|
+
homeHero,
|
|
290
|
+
graphicHero,
|
|
291
|
+
projectHero,
|
|
292
|
+
portalHero,
|
|
293
|
+
publicationHero,
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
export default HeroArgs;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HeroCard } from "../HeroCard.props";
|
|
2
|
+
import { heroCardAlignment, heroCardTypes, heroCardTheme } from "../../types";
|
|
3
|
+
|
|
4
|
+
export interface HeroProps {
|
|
5
|
+
/**
|
|
6
|
+
* Specify an optional className to be added to your Hero component.
|
|
7
|
+
*/
|
|
8
|
+
className?: string;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Props for the image for the hero
|
|
12
|
+
*/
|
|
13
|
+
image?: Required<ImageProps>;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Props for the card for the hero
|
|
17
|
+
*/
|
|
18
|
+
heroCard?: ReactDOM<HeroCardProps>;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Theme for the card
|
|
22
|
+
*/
|
|
23
|
+
theme?: heroCardTheme;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Type of hero for the card
|
|
27
|
+
*/
|
|
28
|
+
types?: heroCardTypes;
|
|
29
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { FC } from "react";
|
|
2
|
+
import classNames from "classnames";
|
|
3
|
+
import useGlobalSettings from "../../hooks/useGlobalSettings";
|
|
4
|
+
import { HeroProps } from "./Hero.props";
|
|
5
|
+
import { HeroCard } from "../Hero";
|
|
6
|
+
import { Image } from "../Image";
|
|
7
|
+
|
|
8
|
+
const Hero: FC<HeroProps> = ({
|
|
9
|
+
className,
|
|
10
|
+
image,
|
|
11
|
+
heroCard,
|
|
12
|
+
theme = "light",
|
|
13
|
+
types,
|
|
14
|
+
}) => {
|
|
15
|
+
const { prefix } = useGlobalSettings();
|
|
16
|
+
|
|
17
|
+
const baseClass = `${prefix}--hero`;
|
|
18
|
+
const heroClasses = classNames(className, {
|
|
19
|
+
[baseClass]: true,
|
|
20
|
+
[`${baseClass}--${theme}`]: theme,
|
|
21
|
+
[`${baseClass}--${types}`]: types,
|
|
22
|
+
[`${baseClass}--image`]: image,
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<>
|
|
27
|
+
<div className={heroClasses}>
|
|
28
|
+
{image && <Image {...image} />}
|
|
29
|
+
<HeroCard {...heroCard} />
|
|
30
|
+
</div>
|
|
31
|
+
</>
|
|
32
|
+
);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export default Hero;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { heroCardAlignment, heroCardTypes, heroCardTheme } from "../../types";
|
|
2
|
+
|
|
3
|
+
export interface HeroCardProps {
|
|
4
|
+
/**
|
|
5
|
+
* Theme for the card
|
|
6
|
+
*/
|
|
7
|
+
alignment?: heroCardAlignment;
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Specify an optional className to be added to your Hero component.
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* date copy for the hero card
|
|
16
|
+
*/
|
|
17
|
+
datecopy?: string;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* eyebrow copy for the hero card
|
|
21
|
+
*/
|
|
22
|
+
eyebrow?: string;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* body copy for the hero card
|
|
26
|
+
*/
|
|
27
|
+
intro?: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Specify the links to be displayed in this link group
|
|
31
|
+
*/
|
|
32
|
+
socials?: Required<Array<SocialProps>>;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Title for the page
|
|
36
|
+
*/
|
|
37
|
+
title: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Theme for the card
|
|
41
|
+
*/
|
|
42
|
+
theme?: heroCardTheme;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Type of hero for the card
|
|
46
|
+
*/
|
|
47
|
+
types?: heroCardTypes;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
interface SocialProps {
|
|
51
|
+
/**
|
|
52
|
+
* Specify the label for this link
|
|
53
|
+
*/
|
|
54
|
+
label?: Required<string>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Specify the url for this link
|
|
58
|
+
*/
|
|
59
|
+
url?: Required<string>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Specify the icon for this link
|
|
63
|
+
*/
|
|
64
|
+
icon?: Required<string>;
|
|
65
|
+
}
|