@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,68 @@
|
|
|
1
|
+
import { Story, Meta } from "@storybook/react";
|
|
2
|
+
import {
|
|
3
|
+
Title,
|
|
4
|
+
Subtitle,
|
|
5
|
+
Description,
|
|
6
|
+
Primary,
|
|
7
|
+
Stories,
|
|
8
|
+
} from "@storybook/addon-docs";
|
|
9
|
+
import { LinkList } from "../components/LinkList";
|
|
10
|
+
import { LinkListProps } from "../components/LinkList/LinkList.props";
|
|
11
|
+
import profileArgs from "../components/LinkList/LinkList.args";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* LinkList Story
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
export default {
|
|
18
|
+
title: "Components/LinkList",
|
|
19
|
+
component: LinkList,
|
|
20
|
+
parameters: {
|
|
21
|
+
componentSubtitle: "Component",
|
|
22
|
+
docs: {
|
|
23
|
+
page: () => (
|
|
24
|
+
<>
|
|
25
|
+
<Subtitle />
|
|
26
|
+
<Title />
|
|
27
|
+
<Description>
|
|
28
|
+
The Link List component is used to display a meaingfully-grouped set
|
|
29
|
+
of links.
|
|
30
|
+
</Description>
|
|
31
|
+
<Primary />
|
|
32
|
+
<Stories title="Examples"></Stories>
|
|
33
|
+
</>
|
|
34
|
+
),
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
} as Meta<typeof LinkList>;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* LinkList Template
|
|
41
|
+
*
|
|
42
|
+
* create a Storybook template for this component
|
|
43
|
+
*
|
|
44
|
+
*@param (Object) args - props to be passed to the component
|
|
45
|
+
*/
|
|
46
|
+
const LinkListTemplate: Story<LinkListProps> = (args) => <LinkList {...args} />;
|
|
47
|
+
|
|
48
|
+
export const Basic = LinkListTemplate.bind({});
|
|
49
|
+
|
|
50
|
+
export const WithIndented = LinkListTemplate.bind({});
|
|
51
|
+
|
|
52
|
+
export const WithSections = LinkListTemplate.bind({});
|
|
53
|
+
|
|
54
|
+
export const WithSectionsIndented = LinkListTemplate.bind({});
|
|
55
|
+
|
|
56
|
+
// enumerate the props for the variations on the LinkList component
|
|
57
|
+
Basic.args = profileArgs.basic;
|
|
58
|
+
Basic.storyName = "LinkList - Basic";
|
|
59
|
+
|
|
60
|
+
WithIndented.args = profileArgs.withindented;
|
|
61
|
+
WithIndented.storyName = "LinkList - With Some Indented Items";
|
|
62
|
+
|
|
63
|
+
WithSections.args = profileArgs.withsections;
|
|
64
|
+
WithSections.storyName = "LinkList - With Sections";
|
|
65
|
+
|
|
66
|
+
WithSectionsIndented.args = profileArgs.withsectionsindented;
|
|
67
|
+
WithSectionsIndented.storyName =
|
|
68
|
+
"LinkList - With Sections and Some Indented Items";
|
|
@@ -0,0 +1,246 @@
|
|
|
1
|
+
import { Story, Meta } from "@storybook/react";
|
|
2
|
+
import {
|
|
3
|
+
Title,
|
|
4
|
+
Subtitle,
|
|
5
|
+
Description,
|
|
6
|
+
Primary,
|
|
7
|
+
ArgsTable,
|
|
8
|
+
Stories,
|
|
9
|
+
Subheading,
|
|
10
|
+
} from "@storybook/addon-docs";
|
|
11
|
+
import { List, ListItem } from "../components/List";
|
|
12
|
+
import { ListProps } from "../components/List/List.props";
|
|
13
|
+
import listArgs from "../components/List/List.args";
|
|
14
|
+
|
|
15
|
+
const sizeDoc = `
|
|
16
|
+
By changing the \`ordered\` prop you can use switch from a \`<ol>\` to a \`<ul>\`
|
|
17
|
+
|
|
18
|
+
| ordered | Description |
|
|
19
|
+
|----------|-------------|
|
|
20
|
+
| \`ordered\` | make a \`<ol>\` |
|
|
21
|
+
| \`unordered\` | make a \`<ul>\` |
|
|
22
|
+
| \`unstyled\` | make a \`<ul>\` without markers |
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* List Story
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export default {
|
|
30
|
+
title: "Components/List",
|
|
31
|
+
component: List,
|
|
32
|
+
argTypes: {},
|
|
33
|
+
subcomponents: {
|
|
34
|
+
ListItem,
|
|
35
|
+
},
|
|
36
|
+
parameters: {
|
|
37
|
+
componentSubtitle: "Component",
|
|
38
|
+
docs: {
|
|
39
|
+
page: () => (
|
|
40
|
+
<>
|
|
41
|
+
<Subtitle />
|
|
42
|
+
<Title />
|
|
43
|
+
<Description>
|
|
44
|
+
The list component allows the user to show and hide sections of
|
|
45
|
+
related content on a page. Click the lists below to expand/collapse
|
|
46
|
+
the list content.
|
|
47
|
+
</Description>
|
|
48
|
+
<Primary />
|
|
49
|
+
<ArgsTable />
|
|
50
|
+
<Subheading>Size Prop</Subheading>
|
|
51
|
+
<Description>{sizeDoc}</Description>
|
|
52
|
+
<Stories title="Examples"></Stories>
|
|
53
|
+
</>
|
|
54
|
+
),
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
} as Meta<typeof List>;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Ordered Template
|
|
61
|
+
*
|
|
62
|
+
* create a Storybook template for this component
|
|
63
|
+
*
|
|
64
|
+
*@param (Object) args - props to be passed to the component
|
|
65
|
+
*/
|
|
66
|
+
const OrderedTemplate: Story<ListProps> = () => (
|
|
67
|
+
<List {...listArgs.ordered}>
|
|
68
|
+
<ListItem id="ordered1">
|
|
69
|
+
<p>Arabica. Arabica is the most popular type of coffee, hands down.</p>
|
|
70
|
+
</ListItem>
|
|
71
|
+
<ListItem id="ordered2">
|
|
72
|
+
<p>
|
|
73
|
+
Robusta. While Arabica is the most popular, Robusta is cheaper and
|
|
74
|
+
stronger.
|
|
75
|
+
</p>
|
|
76
|
+
</ListItem>
|
|
77
|
+
<ListItem id="ordered3">
|
|
78
|
+
<p>
|
|
79
|
+
Black coffee is as simple as it gets with ground coffee beans steeped in
|
|
80
|
+
hot water, served warm.
|
|
81
|
+
</p>
|
|
82
|
+
</ListItem>
|
|
83
|
+
<ListItem id="ordered4">
|
|
84
|
+
<p>
|
|
85
|
+
Latte. Made with espresso and hot steamed milk, milkier than a
|
|
86
|
+
cappuccino.
|
|
87
|
+
</p>
|
|
88
|
+
</ListItem>
|
|
89
|
+
<ListItem id="ordered5">
|
|
90
|
+
<p>
|
|
91
|
+
Cappuccino. Made with espresso and milk that has been frothed up with
|
|
92
|
+
pressurized steam.
|
|
93
|
+
</p>
|
|
94
|
+
</ListItem>
|
|
95
|
+
</List>
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Unordered Template
|
|
100
|
+
*
|
|
101
|
+
* create a Storybook template for this component
|
|
102
|
+
*
|
|
103
|
+
*@param (Object) args - props to be passed to the component
|
|
104
|
+
*/
|
|
105
|
+
const UnorderedTemplate: Story<ListProps> = () => (
|
|
106
|
+
<List {...listArgs.unordered}>
|
|
107
|
+
<ListItem id="unordered1">
|
|
108
|
+
<p>Arabica. Arabica is the most popular type of coffee, hands down.</p>
|
|
109
|
+
</ListItem>
|
|
110
|
+
<ListItem id="unordered2">
|
|
111
|
+
<p>
|
|
112
|
+
Robusta. While Arabica is the most popular, Robusta is cheaper and
|
|
113
|
+
stronger.
|
|
114
|
+
</p>
|
|
115
|
+
</ListItem>
|
|
116
|
+
<ListItem id="unordered3">
|
|
117
|
+
<p>
|
|
118
|
+
Black coffee is as simple as it gets with ground coffee beans steeped in
|
|
119
|
+
hot water, served warm.
|
|
120
|
+
</p>
|
|
121
|
+
</ListItem>
|
|
122
|
+
<ListItem id="unordered4">
|
|
123
|
+
<p>
|
|
124
|
+
Latte. Made with espresso and hot steamed milk, milkier than a
|
|
125
|
+
cappuccino.
|
|
126
|
+
</p>
|
|
127
|
+
</ListItem>
|
|
128
|
+
<ListItem id="unordered5">
|
|
129
|
+
<p>
|
|
130
|
+
Cappuccino. Made with espresso and milk that has been frothed up with
|
|
131
|
+
pressurized steam.
|
|
132
|
+
</p>
|
|
133
|
+
</ListItem>
|
|
134
|
+
</List>
|
|
135
|
+
);
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* Unstyled Template
|
|
139
|
+
*
|
|
140
|
+
* create a Storybook template for this component
|
|
141
|
+
*
|
|
142
|
+
*@param (Object) args - props to be passed to the component
|
|
143
|
+
*/
|
|
144
|
+
const UnstyledTemplate: Story<ListProps> = () => (
|
|
145
|
+
<List {...listArgs.unstyled}>
|
|
146
|
+
<ListItem id="unstyled1">
|
|
147
|
+
<p>Arabica. Arabica is the most popular type of coffee, hands down.</p>
|
|
148
|
+
</ListItem>
|
|
149
|
+
<ListItem id="unstyled1">
|
|
150
|
+
<p>
|
|
151
|
+
<b>With milk added.</b>
|
|
152
|
+
</p>
|
|
153
|
+
</ListItem>
|
|
154
|
+
<ListItem id="unstyled2">
|
|
155
|
+
<p>
|
|
156
|
+
Robusta. While Arabica is the most popular, Robusta is cheaper and
|
|
157
|
+
stronger.
|
|
158
|
+
</p>
|
|
159
|
+
</ListItem>
|
|
160
|
+
<ListItem id="unstyled3">
|
|
161
|
+
<p>
|
|
162
|
+
Black coffee is as simple as it gets with ground coffee beans steeped in
|
|
163
|
+
hot water, served warm.
|
|
164
|
+
</p>
|
|
165
|
+
</ListItem>
|
|
166
|
+
<ListItem id="unstyled4">
|
|
167
|
+
<p>
|
|
168
|
+
Latte. Made with espresso and hot steamed milk, milkier than a
|
|
169
|
+
cappuccino.
|
|
170
|
+
</p>
|
|
171
|
+
</ListItem>
|
|
172
|
+
<ListItem id="unstyled5">
|
|
173
|
+
<p>
|
|
174
|
+
Cappuccino. Made with espresso and milk that has been frothed up with
|
|
175
|
+
pressurized steam.
|
|
176
|
+
</p>
|
|
177
|
+
</ListItem>
|
|
178
|
+
</List>
|
|
179
|
+
);
|
|
180
|
+
|
|
181
|
+
/**
|
|
182
|
+
* Horizontal Template
|
|
183
|
+
*
|
|
184
|
+
* create a Storybook template for this component
|
|
185
|
+
*
|
|
186
|
+
*@param (Object) args - props to be passed to the component
|
|
187
|
+
*/
|
|
188
|
+
const HorizontalTemplate: Story<ListProps> = () => (
|
|
189
|
+
<List {...listArgs.horizontal}>
|
|
190
|
+
<ListItem id="horizontal1">
|
|
191
|
+
<p>Arabica</p>
|
|
192
|
+
</ListItem>
|
|
193
|
+
<ListItem id="horizontal2">
|
|
194
|
+
<p>Robusta</p>
|
|
195
|
+
</ListItem>
|
|
196
|
+
<ListItem id="horizontal3">
|
|
197
|
+
<p>Black coffee</p>
|
|
198
|
+
</ListItem>
|
|
199
|
+
<ListItem id="horizontal4">
|
|
200
|
+
<p>Latte</p>
|
|
201
|
+
</ListItem>
|
|
202
|
+
<ListItem id="horizontal5">
|
|
203
|
+
<p>Cappuccino</p>
|
|
204
|
+
</ListItem>
|
|
205
|
+
</List>
|
|
206
|
+
);
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Ordered List Instance
|
|
210
|
+
*
|
|
211
|
+
*/
|
|
212
|
+
export const ListOrdered = OrderedTemplate.bind({});
|
|
213
|
+
|
|
214
|
+
/**
|
|
215
|
+
* Unordered List Instance
|
|
216
|
+
*
|
|
217
|
+
*/
|
|
218
|
+
export const ListUnordered = UnorderedTemplate.bind({});
|
|
219
|
+
|
|
220
|
+
/**
|
|
221
|
+
* Unstyled List Instance
|
|
222
|
+
*
|
|
223
|
+
*/
|
|
224
|
+
export const ListUnstyled = UnstyledTemplate.bind({});
|
|
225
|
+
|
|
226
|
+
/**
|
|
227
|
+
* Horizontal List Instance
|
|
228
|
+
*
|
|
229
|
+
*/
|
|
230
|
+
export const ListHorizontal = HorizontalTemplate.bind({});
|
|
231
|
+
|
|
232
|
+
// enumerate the props for the ordered list.
|
|
233
|
+
ListOrdered.args = listArgs.ordered;
|
|
234
|
+
ListOrdered.storyName = "Ordered List";
|
|
235
|
+
|
|
236
|
+
// enumerate the props
|
|
237
|
+
ListUnordered.args = listArgs.unordered;
|
|
238
|
+
ListUnordered.storyName = "Unordered List";
|
|
239
|
+
|
|
240
|
+
// enumerate the props
|
|
241
|
+
ListUnstyled.args = listArgs.unstyled;
|
|
242
|
+
ListUnstyled.storyName = "Unstyled List";
|
|
243
|
+
|
|
244
|
+
// enumerate the props
|
|
245
|
+
ListHorizontal.args = listArgs.horizontal;
|
|
246
|
+
ListHorizontal.storyName = "Horizontal List";
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Story, Meta } from "@storybook/react";
|
|
2
|
+
import {
|
|
3
|
+
Title,
|
|
4
|
+
Subtitle,
|
|
5
|
+
Description,
|
|
6
|
+
Primary,
|
|
7
|
+
Stories,
|
|
8
|
+
Subheading,
|
|
9
|
+
} from "@storybook/addon-docs";
|
|
10
|
+
import { Loading } from "../components/Loading";
|
|
11
|
+
import { LoadingProps } from "../components/Loading/Loading.props";
|
|
12
|
+
import loadingArgs from "../components/Loading/Loading.args";
|
|
13
|
+
|
|
14
|
+
const statusDoc = `
|
|
15
|
+
By changing the \`status\` prop you can change whether the Loading component is displaying the spinner, the completed state, or nothing at all.
|
|
16
|
+
|
|
17
|
+
| type | Description |
|
|
18
|
+
|----------|-------------|
|
|
19
|
+
| \`idle\` | The Loading component is idle and displays nothing. For screen readers, the component must be on the page before the loading state is invoked. |
|
|
20
|
+
| \`loading\` | The Loading component displays the spinner graphic and the loading message. |
|
|
21
|
+
| \`loaded\` | The Loading component displays the completed message and graphic. |`;
|
|
22
|
+
|
|
23
|
+
const sizeDoc = `
|
|
24
|
+
By changing the \`size\` prop you can change whether the Loading component appears as the small or large design.
|
|
25
|
+
|
|
26
|
+
| type | Description |
|
|
27
|
+
|----------|-------------|
|
|
28
|
+
| \`small\` | The Loading component displays the small design |
|
|
29
|
+
| \`large\` | The Loading component displays the large design |`;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Loading Story
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
export default {
|
|
36
|
+
title: "Components/Loading",
|
|
37
|
+
component: Loading,
|
|
38
|
+
parameters: {
|
|
39
|
+
componentSubtitle: "Component",
|
|
40
|
+
docs: {
|
|
41
|
+
page: () => (
|
|
42
|
+
<>
|
|
43
|
+
<Subtitle />
|
|
44
|
+
<Title />
|
|
45
|
+
<Description>
|
|
46
|
+
The Loading component displays a loading state. Status is passed to
|
|
47
|
+
it via props, along with size setting.
|
|
48
|
+
</Description>
|
|
49
|
+
<Primary />
|
|
50
|
+
<Subheading>status Prop</Subheading>
|
|
51
|
+
<Description>{statusDoc}</Description>
|
|
52
|
+
<Subheading>size Prop</Subheading>
|
|
53
|
+
<Description>{sizeDoc}</Description>
|
|
54
|
+
<Stories title="Examples"></Stories>
|
|
55
|
+
</>
|
|
56
|
+
),
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
} as Meta<typeof Loading>;
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Loading Template
|
|
63
|
+
*
|
|
64
|
+
* create a Storybook template for this component
|
|
65
|
+
*
|
|
66
|
+
*@param (Object) args - props to be passed to the component
|
|
67
|
+
*/
|
|
68
|
+
const LoadingTemplate: Story<LoadingProps> = (args) => <Loading {...args} />;
|
|
69
|
+
|
|
70
|
+
export const BaseLoading = LoadingTemplate.bind({});
|
|
71
|
+
|
|
72
|
+
export const LoadingLarge = LoadingTemplate.bind({});
|
|
73
|
+
|
|
74
|
+
export const LoadedLarge = LoadingTemplate.bind({});
|
|
75
|
+
|
|
76
|
+
export const IdleLarge = LoadingTemplate.bind({});
|
|
77
|
+
|
|
78
|
+
export const LoadingSmall = LoadingTemplate.bind({});
|
|
79
|
+
|
|
80
|
+
export const LoadedSmall = LoadingTemplate.bind({});
|
|
81
|
+
|
|
82
|
+
export const IdleSmall = LoadingTemplate.bind({});
|
|
83
|
+
|
|
84
|
+
BaseLoading.args = loadingArgs.loadinglarge;
|
|
85
|
+
BaseLoading.storyName = "Loading - loading large";
|
|
86
|
+
|
|
87
|
+
LoadingLarge.args = loadingArgs.loadinglarge;
|
|
88
|
+
LoadingLarge.storyName = "Loading - loading large";
|
|
89
|
+
|
|
90
|
+
LoadedLarge.args = loadingArgs.loadedlarge;
|
|
91
|
+
LoadedLarge.storyName = "Loading - loaded large";
|
|
92
|
+
|
|
93
|
+
IdleLarge.args = loadingArgs.idlelarge;
|
|
94
|
+
IdleLarge.storyName = "Loading - idle large";
|
|
95
|
+
|
|
96
|
+
LoadingSmall.args = loadingArgs.loadingsmall;
|
|
97
|
+
LoadingSmall.storyName = "Loading - loading small";
|
|
98
|
+
|
|
99
|
+
LoadedSmall.args = loadingArgs.loadedsmall;
|
|
100
|
+
LoadedSmall.storyName = "Loading - loaded small";
|
|
101
|
+
|
|
102
|
+
IdleSmall.args = loadingArgs.idlesmall;
|
|
103
|
+
IdleSmall.storyName = "Loading - idle small";
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
import { Story, Meta } from "@storybook/react";
|
|
2
|
+
import {
|
|
3
|
+
Title,
|
|
4
|
+
Subtitle,
|
|
5
|
+
Subheading,
|
|
6
|
+
Description,
|
|
7
|
+
Primary,
|
|
8
|
+
ArgsTable,
|
|
9
|
+
Stories,
|
|
10
|
+
} from "@storybook/addon-docs";
|
|
11
|
+
import { Notification } from "../components/Notification";
|
|
12
|
+
import { NotificationProps } from "../components/Notification/Notification.props";
|
|
13
|
+
import notificationArgs from "../components/Notification/Notification.args";
|
|
14
|
+
|
|
15
|
+
const typeDoc = `
|
|
16
|
+
By changing the \`type\` prop you can set which icon to use with the Notification.
|
|
17
|
+
|
|
18
|
+
| type | Description |
|
|
19
|
+
|----------|-------------|
|
|
20
|
+
| \`error\` | The Notification alerts user to an error. Border is red with an error icon. |
|
|
21
|
+
| \`info\` | The Notification alerts user to new information. Border is blue with an info icon. |
|
|
22
|
+
| \`success\` | The Notification alerts user to an operation's success. Border is green with a success icon. |
|
|
23
|
+
| \`warning\` | The Notification alerts user to a warning. Border is yellow with a warning icon. |`;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Notification Story
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export default {
|
|
30
|
+
title: "Components/Notification",
|
|
31
|
+
component: Notification,
|
|
32
|
+
argTypes: {},
|
|
33
|
+
parameters: {
|
|
34
|
+
componentSubtitle: "Component",
|
|
35
|
+
docs: {
|
|
36
|
+
page: () => (
|
|
37
|
+
<>
|
|
38
|
+
<Subtitle />
|
|
39
|
+
<Title />
|
|
40
|
+
<Description>
|
|
41
|
+
The Notification component presents a dismissible alert.
|
|
42
|
+
</Description>
|
|
43
|
+
<Primary />
|
|
44
|
+
<ArgsTable />
|
|
45
|
+
<Subheading>type Prop</Subheading>
|
|
46
|
+
<Description>{typeDoc}</Description>
|
|
47
|
+
<Stories title="Examples"></Stories>
|
|
48
|
+
</>
|
|
49
|
+
),
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
} as Meta<typeof Notification>;
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* Notification Template
|
|
56
|
+
*
|
|
57
|
+
* create a Storybook template for this component
|
|
58
|
+
*
|
|
59
|
+
*@param (Object) args - props to be passed to the component
|
|
60
|
+
*/
|
|
61
|
+
const NotificationTemplate: Story<NotificationProps> = (args) => (
|
|
62
|
+
<Notification {...args} />
|
|
63
|
+
);
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Notification Instance without CTA
|
|
67
|
+
*
|
|
68
|
+
*/
|
|
69
|
+
export const BaseNotification = NotificationTemplate.bind({});
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Notification Instance - CTA is populated
|
|
73
|
+
*
|
|
74
|
+
*/
|
|
75
|
+
export const NotificationWithCTA = NotificationTemplate.bind({});
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* Notification Instance - error
|
|
79
|
+
*
|
|
80
|
+
*/
|
|
81
|
+
export const NotificationError = NotificationTemplate.bind({});
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Notification Instance - success
|
|
85
|
+
*
|
|
86
|
+
*/
|
|
87
|
+
export const NotificationSuccess = NotificationTemplate.bind({});
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* Notification Instance - warning
|
|
91
|
+
*
|
|
92
|
+
*/
|
|
93
|
+
export const NotificationWarning = NotificationTemplate.bind({});
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Notification Instance - info, as dialog
|
|
97
|
+
*
|
|
98
|
+
*/
|
|
99
|
+
export const DialogNotification = NotificationTemplate.bind({});
|
|
100
|
+
|
|
101
|
+
/**
|
|
102
|
+
* Notification Instance - CTA is populated, as dialog
|
|
103
|
+
*
|
|
104
|
+
*/
|
|
105
|
+
export const DialogWithCTA = NotificationTemplate.bind({});
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Notification Instance - error, as dialog
|
|
109
|
+
*
|
|
110
|
+
*/
|
|
111
|
+
export const DialogError = NotificationTemplate.bind({});
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Notification Instance - success, as dialog
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
export const DialogSuccess = NotificationTemplate.bind({});
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* Notification Instance - warning, as dialog
|
|
121
|
+
*
|
|
122
|
+
*/
|
|
123
|
+
export const DialogWarning = NotificationTemplate.bind({});
|
|
124
|
+
|
|
125
|
+
// enumerate the props for the read more component
|
|
126
|
+
BaseNotification.args = notificationArgs.nocta;
|
|
127
|
+
BaseNotification.storyName = "Notification - info";
|
|
128
|
+
|
|
129
|
+
NotificationWithCTA.args = notificationArgs.hascta;
|
|
130
|
+
NotificationWithCTA.storyName = "Notification - has call to action";
|
|
131
|
+
|
|
132
|
+
NotificationError.args = notificationArgs.error;
|
|
133
|
+
NotificationError.storyName = "Notification - error";
|
|
134
|
+
|
|
135
|
+
NotificationSuccess.args = notificationArgs.success;
|
|
136
|
+
NotificationSuccess.storyName = "Notification - success";
|
|
137
|
+
|
|
138
|
+
NotificationWarning.args = notificationArgs.warning;
|
|
139
|
+
NotificationWarning.storyName = "Notification - warning";
|
|
140
|
+
|
|
141
|
+
DialogNotification.args = notificationArgs.infodialog;
|
|
142
|
+
DialogNotification.storyName = "Notification - info dialog";
|
|
143
|
+
|
|
144
|
+
DialogWithCTA.args = notificationArgs.hasctadialog;
|
|
145
|
+
DialogWithCTA.storyName = "Notification - dialog, has call to action";
|
|
146
|
+
|
|
147
|
+
DialogError.args = notificationArgs.errordialog;
|
|
148
|
+
DialogError.storyName = "Notification - error dialog";
|
|
149
|
+
|
|
150
|
+
DialogSuccess.args = notificationArgs.successdialog;
|
|
151
|
+
DialogSuccess.storyName = "Notification - success dialog";
|
|
152
|
+
|
|
153
|
+
DialogWarning.args = notificationArgs.warningdialog;
|
|
154
|
+
DialogWarning.storyName = "Notification - warning dialog";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { Story, Meta } from "@storybook/react";
|
|
2
|
+
import {
|
|
3
|
+
Title,
|
|
4
|
+
Subtitle,
|
|
5
|
+
Subheading,
|
|
6
|
+
Description,
|
|
7
|
+
Primary,
|
|
8
|
+
ArgsTable,
|
|
9
|
+
Stories,
|
|
10
|
+
} from "@storybook/addon-docs";
|
|
11
|
+
import { Pagination } from "../components/Pagination";
|
|
12
|
+
import { PaginationProps } from "../components/Pagination/Pagination.props";
|
|
13
|
+
import paginationArgs from "../components/Pagination/Pagination.args";
|
|
14
|
+
|
|
15
|
+
const typeDoc = `
|
|
16
|
+
Generic pagination component with a first, previous, last and next button`;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Pagination Story
|
|
20
|
+
*
|
|
21
|
+
*/
|
|
22
|
+
export default {
|
|
23
|
+
title: "Components/Pagination",
|
|
24
|
+
component: Pagination,
|
|
25
|
+
argTypes: {},
|
|
26
|
+
parameters: {
|
|
27
|
+
componentSubtitle: "Component",
|
|
28
|
+
docs: {
|
|
29
|
+
page: () => (
|
|
30
|
+
<>
|
|
31
|
+
<Subtitle />
|
|
32
|
+
<Title />
|
|
33
|
+
<Description>The Pagination component</Description>
|
|
34
|
+
<Primary />
|
|
35
|
+
<ArgsTable />
|
|
36
|
+
<Subheading>type Prop</Subheading>
|
|
37
|
+
<Description>{typeDoc}</Description>
|
|
38
|
+
<Stories title="Examples"></Stories>
|
|
39
|
+
</>
|
|
40
|
+
),
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
} as Meta<typeof Pagination>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Pagination Template
|
|
47
|
+
*
|
|
48
|
+
* create a Storybook template for this component
|
|
49
|
+
*
|
|
50
|
+
*@param (Object) args - props to be passed to the component
|
|
51
|
+
*/
|
|
52
|
+
const PaginationTemplate: Story<PaginationProps> = (args) => (
|
|
53
|
+
<Pagination {...args} />
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Pagination Instance without CTA
|
|
58
|
+
*
|
|
59
|
+
*/
|
|
60
|
+
export const BasePagination = PaginationTemplate.bind({});
|
|
61
|
+
|
|
62
|
+
BasePagination.args = paginationArgs.pagination;
|
|
63
|
+
BasePagination.storyName = "Pagination";
|