@nypl/design-system-react-components 0.25.11 → 0.26.0
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/CHANGELOG.md +151 -0
- package/README.md +14 -26
- package/dist/components/Accordion/Accordion.d.ts +6 -4
- package/dist/components/Accordion/AccordionTypes.d.ts +5 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +4 -4
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +2 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Card/Card.d.ts +22 -29
- package/dist/components/Checkbox/Checkbox.d.ts +3 -3
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +9 -6
- package/dist/components/ComponentWrapper/ComponentWrapper.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +5 -6
- package/dist/components/Fieldset/Fieldset.d.ts +5 -6
- package/dist/components/Form/Form.d.ts +6 -6
- package/dist/components/Grid/GridTypes.d.ts +7 -7
- package/dist/components/Grid/SimpleGrid.d.ts +1 -1
- package/dist/components/Heading/Heading.d.ts +5 -5
- package/dist/components/Heading/HeadingTypes.d.ts +1 -1
- package/dist/components/HelperErrorText/HelperErrorText.d.ts +9 -8
- package/dist/components/Hero/Hero.d.ts +9 -5
- package/dist/components/HorizontalRule/HorizontalRule.d.ts +2 -10
- package/dist/components/Icons/Icon.d.ts +2 -1
- package/dist/components/Icons/IconTypes.d.ts +10 -7
- package/dist/components/Image/Image.d.ts +27 -9
- package/dist/components/Image/ImageTypes.d.ts +4 -4
- package/dist/components/Label/Label.d.ts +7 -4
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/List/List.d.ts +11 -11
- package/dist/components/List/ListTypes.d.ts +1 -1
- package/dist/components/Logo/Logo.d.ts +2 -1
- package/dist/components/Logo/LogoSvgs.d.ts +8 -0
- package/dist/components/Logo/LogoTypes.d.ts +10 -2
- package/dist/components/Notification/Notification.d.ts +7 -7
- package/dist/components/Pagination/Pagination.d.ts +8 -4
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +3 -3
- package/dist/components/Radio/Radio.d.ts +5 -7
- package/dist/components/RadioGroup/RadioGroup.d.ts +16 -8
- package/dist/components/SearchBar/SearchBar.d.ts +5 -5
- package/dist/components/Select/Select.d.ts +12 -8
- package/dist/components/Select/SelectTypes.d.ts +4 -0
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +8 -6
- package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -4
- package/dist/components/Slider/Slider.d.ts +6 -4
- package/dist/components/StatusBadge/StatusBadge.d.ts +5 -1
- package/dist/components/StructuredContent/StructuredContent.d.ts +10 -23
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +7 -6
- package/dist/components/Template/Template.d.ts +18 -9
- package/dist/components/Text/Text.d.ts +4 -4
- package/dist/components/Text/TextTypes.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +7 -7
- package/dist/components/Toggle/Toggle.d.ts +8 -10
- package/dist/components/Toggle/{ToggleSizes.d.ts → ToggleTypes.d.ts} +1 -1
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
- package/dist/design-system-react-components.cjs.development.js +2802 -1686
- package/dist/design-system-react-components.cjs.development.js.map +1 -1
- package/dist/design-system-react-components.cjs.production.min.js +1 -1
- package/dist/design-system-react-components.cjs.production.min.js.map +1 -1
- package/dist/design-system-react-components.esm.js +2811 -1699
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/helpers/enums.d.ts +4 -0
- package/dist/hooks/useCarouselStyles.d.ts +3 -2
- package/dist/hooks/useNYPLTheme.d.ts +12 -0
- package/dist/index.d.ts +11 -9
- package/dist/styles.css +1 -1
- package/dist/theme/components/accordion.d.ts +7 -12
- package/dist/theme/components/breadcrumb.d.ts +6 -0
- package/dist/theme/components/button.d.ts +10 -2
- package/dist/theme/components/card.d.ts +44 -24
- package/dist/theme/components/checkbox.d.ts +6 -6
- package/dist/theme/components/checkboxGroup.d.ts +4 -2
- package/dist/theme/components/componentWrapper.d.ts +2 -2
- package/dist/theme/components/customTable.d.ts +84 -1
- package/dist/theme/components/fieldset.d.ts +6 -14
- package/dist/theme/components/global.d.ts +37 -29
- package/dist/theme/components/globalMixins.d.ts +8 -8
- package/dist/theme/components/heading.d.ts +53 -0
- package/dist/theme/components/helperErrorText.d.ts +1 -0
- package/dist/theme/components/hero.d.ts +21 -15
- package/dist/theme/components/image.d.ts +1 -1
- package/dist/theme/components/label.d.ts +9 -10
- package/dist/theme/components/list.d.ts +105 -9
- package/dist/theme/components/notification.d.ts +7 -4
- package/dist/theme/components/pagination.d.ts +2 -5
- package/dist/theme/components/radio.d.ts +10 -6
- package/dist/theme/components/radioGroup.d.ts +4 -2
- package/dist/theme/components/select.d.ts +38 -13
- package/dist/theme/components/skeletonLoader.d.ts +2 -2
- package/dist/theme/components/slider.d.ts +14 -7
- package/dist/theme/components/structuredContent.d.ts +197 -0
- package/dist/theme/components/textInput.d.ts +22 -14
- package/dist/theme/components/toggle.d.ts +25 -6
- package/dist/theme/foundations/global.d.ts +33 -3
- package/dist/theme/foundations/radii.d.ts +1 -0
- package/dist/theme/foundations/spacing.d.ts +46 -43
- package/dist/utils/utils.d.ts +10 -0
- package/package.json +5 -6
- package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +34 -0
- package/src/components/Accordion/Accordion.stories.mdx +150 -66
- package/src/components/Accordion/Accordion.test.tsx +65 -17
- package/src/components/Accordion/Accordion.tsx +61 -27
- package/src/components/Accordion/AccordionTypes.tsx +5 -0
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +505 -14
- package/src/components/Autosuggest/Autosuggest.stories.mdx +4 -3
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +53 -18
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +66 -35
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +14 -13
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +2 -1
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +308 -10
- package/src/components/Button/Button.stories.mdx +87 -23
- package/src/components/Button/Button.test.tsx +25 -0
- package/src/components/Button/Button.tsx +18 -7
- package/src/components/Button/__snapshots__/Button.test.tsx.snap +27 -7
- package/src/components/Card/Card.stories.mdx +493 -329
- package/src/components/Card/Card.test.tsx +138 -18
- package/src/components/Card/Card.tsx +151 -85
- package/src/components/Card/__snapshots__/Card.test.tsx.snap +220 -100
- package/src/components/Chakra/Center.stories.mdx +2 -2
- package/src/components/Chakra/Grid.stories.mdx +4 -4
- package/src/components/Checkbox/Checkbox.stories.mdx +73 -9
- package/src/components/Checkbox/Checkbox.test.tsx +89 -10
- package/src/components/Checkbox/Checkbox.tsx +27 -16
- package/src/components/Checkbox/__snapshots__/Checkbox.test.tsx.snap +209 -6
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +135 -23
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +216 -90
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +39 -26
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +493 -89
- package/src/components/ComponentWrapper/ComponentWrapper.test.tsx +12 -0
- package/src/components/ComponentWrapper/ComponentWrapper.tsx +39 -41
- package/src/components/ComponentWrapper/__snapshots__/ComponentWrapper.test.tsx.snap +47 -34
- package/src/components/DatePicker/DatePicker.stories.mdx +63 -27
- package/src/components/DatePicker/DatePicker.test.tsx +94 -15
- package/src/components/DatePicker/DatePicker.tsx +67 -58
- package/src/components/DatePicker/_DatePicker.scss +71 -13
- package/src/components/DatePicker/__snapshots__/DatePicker.test.tsx.snap +250 -206
- package/src/components/Fieldset/Fieldset.stories.mdx +33 -3
- package/src/components/Fieldset/Fieldset.test.tsx +58 -28
- package/src/components/Fieldset/Fieldset.tsx +35 -30
- package/src/components/Fieldset/__snapshots__/Fieldset.test.tsx.snap +40 -19
- package/src/components/Form/Form.stories.mdx +118 -47
- package/src/components/Form/Form.test.tsx +59 -16
- package/src/components/Form/Form.tsx +89 -65
- package/src/components/Form/__snapshots__/Form.test.tsx.snap +83 -5
- package/src/components/Grid/GridTypes.tsx +7 -7
- package/src/components/Grid/SimpleGrid.stories.mdx +87 -41
- package/src/components/Grid/SimpleGrid.test.tsx +24 -9
- package/src/components/Grid/SimpleGrid.tsx +29 -20
- package/src/components/Grid/__snapshots__/SimpleGrid.test.tsx.snap +16 -1
- package/src/components/Heading/Heading.stories.mdx +56 -25
- package/src/components/Heading/Heading.test.tsx +17 -7
- package/src/components/Heading/Heading.tsx +60 -58
- package/src/components/Heading/HeadingTypes.tsx +1 -1
- package/src/components/Heading/__snapshots__/Heading.test.tsx.snap +27 -8
- package/src/components/HelperErrorText/HelperErrorText.stories.mdx +64 -42
- package/src/components/HelperErrorText/HelperErrorText.test.tsx +15 -0
- package/src/components/HelperErrorText/HelperErrorText.tsx +40 -35
- package/src/components/HelperErrorText/__snapshots__/HelperErrorText.test.tsx.snap +35 -4
- package/src/components/Hero/Hero.stories.mdx +143 -113
- package/src/components/Hero/Hero.test.tsx +146 -58
- package/src/components/Hero/Hero.tsx +144 -112
- package/src/components/Hero/__snapshots__/Hero.test.tsx.snap +89 -17
- package/src/components/HorizontalRule/HorizontalRule.stories.mdx +26 -4
- package/src/components/HorizontalRule/HorizontalRule.test.tsx +9 -17
- package/src/components/HorizontalRule/HorizontalRule.tsx +9 -25
- package/src/components/HorizontalRule/__snapshots__/HorizontalRule.test.tsx.snap +18 -5
- package/src/components/Icons/Icon.stories.mdx +80 -23
- package/src/components/Icons/Icon.test.tsx +51 -2
- package/src/components/Icons/Icon.tsx +93 -71
- package/src/components/Icons/IconTypes.tsx +9 -6
- package/src/components/Icons/__snapshots__/Icon.test.tsx.snap +129 -0
- package/src/components/Image/Image.stories.mdx +160 -71
- package/src/components/Image/Image.test.tsx +40 -48
- package/src/components/Image/Image.tsx +80 -48
- package/src/components/Image/ImageTypes.ts +4 -4
- package/src/components/Image/__snapshots__/Image.test.tsx.snap +84 -21
- package/src/components/Label/Label.stories.mdx +42 -20
- package/src/components/Label/Label.test.tsx +42 -17
- package/src/components/Label/Label.tsx +22 -13
- package/src/components/Label/__snapshots__/Label.test.tsx.snap +19 -15
- package/src/components/Link/Link.stories.mdx +25 -1
- package/src/components/Link/Link.test.tsx +21 -0
- package/src/components/Link/Link.tsx +16 -9
- package/src/components/Link/__snapshots__/Link.test.tsx.snap +37 -11
- package/src/components/List/List.stories.mdx +75 -40
- package/src/components/List/List.test.tsx +73 -22
- package/src/components/List/List.tsx +44 -28
- package/src/components/List/ListTypes.tsx +1 -1
- package/src/components/List/__snapshots__/List.test.tsx.snap +110 -8
- package/src/components/Logo/Logo.stories.mdx +40 -16
- package/src/components/Logo/Logo.test.tsx +29 -2
- package/src/components/Logo/Logo.tsx +28 -11
- package/src/components/Logo/LogoSvgs.tsx +16 -0
- package/src/components/Logo/LogoTypes.tsx +9 -1
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +73 -2
- package/src/components/Modal/Modal.stories.mdx +13 -0
- package/src/components/Notification/Notification.stories.mdx +34 -5
- package/src/components/Notification/Notification.test.tsx +43 -9
- package/src/components/Notification/Notification.tsx +59 -55
- package/src/components/Notification/__snapshots__/Notification.test.tsx.snap +256 -32
- package/src/components/Pagination/Pagination.stories.mdx +76 -13
- package/src/components/Pagination/Pagination.test.tsx +116 -5
- package/src/components/Pagination/Pagination.tsx +54 -29
- package/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +247 -30
- package/src/components/Placeholder/Placeholder.tsx +3 -1
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +76 -10
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +87 -13
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +20 -10
- package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +101 -14
- package/src/components/Radio/Radio.stories.mdx +75 -11
- package/src/components/Radio/Radio.test.tsx +83 -9
- package/src/components/Radio/Radio.tsx +70 -61
- package/src/components/Radio/__snapshots__/Radio.test.tsx.snap +168 -10
- package/src/components/RadioGroup/RadioGroup.stories.mdx +293 -94
- package/src/components/RadioGroup/RadioGroup.test.tsx +193 -68
- package/src/components/RadioGroup/RadioGroup.tsx +110 -101
- package/src/components/RadioGroup/__snapshots__/RadioGroup.test.tsx.snap +1258 -902
- package/src/components/SearchBar/SearchBar.stories.mdx +104 -39
- package/src/components/SearchBar/{SearchBar.Test.tsx → SearchBar.test.tsx} +66 -6
- package/src/components/SearchBar/SearchBar.tsx +23 -13
- package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1039 -0
- package/src/components/Select/Select.stories.mdx +151 -62
- package/src/components/Select/Select.test.tsx +56 -44
- package/src/components/Select/Select.tsx +125 -104
- package/src/components/Select/SelectTypes.tsx +5 -0
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +749 -409
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +53 -23
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +14 -8
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +80 -78
- package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
- package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +169 -10
- package/src/components/Slider/Slider.stories.mdx +123 -41
- package/src/components/Slider/Slider.test.tsx +65 -17
- package/src/components/Slider/Slider.tsx +34 -24
- package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +403 -226
- package/src/components/StatusBadge/StatusBadge.stories.mdx +19 -1
- package/src/components/StatusBadge/StatusBadge.test.tsx +19 -1
- package/src/components/StatusBadge/StatusBadge.tsx +25 -20
- package/src/components/StatusBadge/__snapshots__/StatusBadge.test.tsx.snap +22 -3
- package/src/components/StructuredContent/StructuredContent.stories.mdx +229 -61
- package/src/components/StructuredContent/StructuredContent.test.tsx +162 -101
- package/src/components/StructuredContent/StructuredContent.tsx +98 -103
- package/src/components/StructuredContent/__snapshots__/StructuredContent.test.tsx.snap +102 -17
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +9 -9
- package/src/components/StyleGuide/Breakpoints.stories.mdx +6 -6
- package/src/components/StyleGuide/Buttons.stories.mdx +2 -12
- package/src/components/StyleGuide/ColorCard.tsx +4 -4
- package/src/components/StyleGuide/Colors.stories.mdx +34 -20
- package/src/components/StyleGuide/DesignTokens.stories.mdx +56 -26
- package/src/components/StyleGuide/Forms.stories.mdx +27 -12
- package/src/components/StyleGuide/Iconography.stories.mdx +2 -12
- package/src/components/StyleGuide/Spacing.stories.mdx +80 -41
- package/src/components/StyleGuide/Typography.stories.mdx +47 -33
- package/src/components/Table/Table.stories.mdx +38 -11
- package/src/components/Table/Table.test.tsx +16 -1
- package/src/components/Table/Table.tsx +10 -8
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +408 -5
- package/src/components/Tabs/Tabs.stories.mdx +59 -10
- package/src/components/Tabs/Tabs.test.tsx +29 -11
- package/src/components/Tabs/Tabs.tsx +28 -21
- package/src/components/Tabs/__snapshots__/Tabs.test.tsx.snap +394 -5
- package/src/components/Template/Template.stories.mdx +73 -32
- package/src/components/Template/Template.test.tsx +68 -5
- package/src/components/Template/Template.tsx +86 -72
- package/src/components/Template/__snapshots__/Template.test.tsx.snap +195 -22
- package/src/components/Text/Text.stories.mdx +32 -15
- package/src/components/Text/Text.test.tsx +14 -11
- package/src/components/Text/Text.tsx +13 -16
- package/src/components/Text/TextTypes.tsx +1 -1
- package/src/components/Text/__snapshots__/Text.test.tsx.snap +21 -4
- package/src/components/TextInput/TextInput.stories.mdx +73 -27
- package/src/components/TextInput/TextInput.test.tsx +65 -50
- package/src/components/TextInput/TextInput.tsx +123 -115
- package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +96 -73
- package/src/components/Toggle/Toggle.stories.mdx +74 -26
- package/src/components/Toggle/Toggle.test.tsx +41 -10
- package/src/components/Toggle/Toggle.tsx +31 -27
- package/src/components/Toggle/{ToggleSizes.tsx → ToggleTypes.tsx} +1 -1
- package/src/components/Toggle/__snapshots__/Toggle.test.tsx.snap +195 -8
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +52 -4
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +41 -6
- package/src/components/VideoPlayer/VideoPlayer.tsx +134 -120
- package/src/components/VideoPlayer/__snapshots__/VideoPlayer.test.tsx.snap +81 -39
- package/src/docs/Chakra.stories.mdx +51 -10
- package/src/docs/Welcome.stories.mdx +168 -0
- package/src/{components/Card/CardTypes.tsx → helpers/enums.ts} +2 -2
- package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
- package/src/hooks/useCarouselStyles.stories.mdx +30 -0
- package/src/hooks/useCarouselStyles.ts +3 -2
- package/src/hooks/useNYPLTheme.stories.mdx +101 -0
- package/src/hooks/useNYPLTheme.ts +31 -7
- package/src/hooks/useWindowSize.stories.mdx +23 -0
- package/src/index.ts +11 -15
- package/src/styles/base/_place-holder.scss +3 -1
- package/src/styles.scss +0 -2
- package/src/theme/components/accordion.ts +7 -12
- package/src/theme/components/breadcrumb.ts +7 -0
- package/src/theme/components/button.ts +15 -7
- package/src/theme/components/card.ts +56 -36
- package/src/theme/components/checkbox.ts +12 -14
- package/src/theme/components/checkboxGroup.ts +4 -2
- package/src/theme/components/componentWrapper.ts +2 -2
- package/src/theme/components/customTable.ts +39 -31
- package/src/theme/components/fieldset.ts +3 -2
- package/src/theme/components/global.ts +42 -33
- package/src/theme/components/globalMixins.ts +8 -8
- package/src/theme/components/heading.ts +1 -1
- package/src/theme/components/helperErrorText.ts +1 -0
- package/src/theme/components/hero.ts +14 -16
- package/src/theme/components/icon.ts +5 -2
- package/src/theme/components/image.ts +1 -1
- package/src/theme/components/label.ts +4 -3
- package/src/theme/components/list.ts +76 -65
- package/src/theme/components/notification.ts +10 -7
- package/src/theme/components/pagination.ts +2 -5
- package/src/theme/components/progressIndicator.ts +3 -3
- package/src/theme/components/radio.ts +11 -14
- package/src/theme/components/radioGroup.ts +4 -2
- package/src/theme/components/select.ts +37 -18
- package/src/theme/components/skeletonLoader.ts +3 -3
- package/src/theme/components/slider.ts +19 -15
- package/src/theme/components/statusBadge.ts +2 -2
- package/src/theme/components/structuredContent.ts +66 -1
- package/src/theme/components/tabs.ts +2 -2
- package/src/theme/components/template.ts +9 -9
- package/src/theme/components/textInput.ts +13 -12
- package/src/theme/components/toggle.ts +76 -42
- package/src/theme/components/videoPlayer.ts +1 -1
- package/src/theme/foundations/colors.ts +20 -13
- package/src/theme/foundations/global.ts +17 -5
- package/src/theme/foundations/radii.ts +1 -0
- package/src/theme/foundations/spacing.ts +70 -22
- package/src/theme/foundations/typography.ts +3 -3
- package/src/utils/componentCategories.ts +28 -21
- package/src/utils/utils.ts +28 -0
- package/dist/components/Card/CardTypes.d.ts +0 -4
- package/dist/components/CheckboxGroup/CheckboxGroupLayoutTypes.d.ts +0 -4
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -13
- package/dist/components/RadioGroup/RadioGroupLayoutTypes.d.ts +0 -4
- package/dist/components/SearchBar/SearchBar.Test.d.ts +0 -1
- package/dist/helpers/generateUUID.d.ts +0 -1
- package/src/components/CheckboxGroup/CheckboxGroupLayoutTypes.tsx +0 -4
- package/src/components/Pagination/Pagination.stories.tsx +0 -54
- package/src/components/RadioGroup/RadioGroupLayoutTypes.tsx +0 -4
- package/src/docs/Intro.stories.mdx +0 -53
- package/src/helpers/generateUUID.tsx +0 -5
- package/src/styles/base/_03-base.scss +0 -25
- package/src/styles/base/_04-focus.scss +0 -22
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`Icon renders the UI snapshot correctly 1`] = `
|
|
4
|
+
<svg
|
|
5
|
+
aria-hidden={true}
|
|
6
|
+
className="chakra-icon css-1grhd2q"
|
|
7
|
+
focusable={false}
|
|
8
|
+
id="basic"
|
|
9
|
+
role="img"
|
|
10
|
+
title="download icon"
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
>
|
|
13
|
+
<g
|
|
14
|
+
stroke="currentColor"
|
|
15
|
+
strokeWidth="1.5"
|
|
16
|
+
>
|
|
17
|
+
<path
|
|
18
|
+
d="M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"
|
|
19
|
+
fill="none"
|
|
20
|
+
strokeLinecap="round"
|
|
21
|
+
/>
|
|
22
|
+
<path
|
|
23
|
+
d="M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"
|
|
24
|
+
fill="currentColor"
|
|
25
|
+
strokeLinecap="round"
|
|
26
|
+
/>
|
|
27
|
+
<circle
|
|
28
|
+
cx="12"
|
|
29
|
+
cy="12"
|
|
30
|
+
fill="none"
|
|
31
|
+
r="11.25"
|
|
32
|
+
strokeMiterlimit="10"
|
|
33
|
+
/>
|
|
34
|
+
</g>
|
|
35
|
+
</svg>
|
|
36
|
+
`;
|
|
37
|
+
|
|
38
|
+
exports[`Icon renders the UI snapshot correctly 2`] = `
|
|
39
|
+
<div
|
|
40
|
+
className="css-0"
|
|
41
|
+
>
|
|
42
|
+
<svg
|
|
43
|
+
aria-hidden={true}
|
|
44
|
+
className="css-0"
|
|
45
|
+
id="customIcon"
|
|
46
|
+
role="img"
|
|
47
|
+
title="undefined icon"
|
|
48
|
+
viewBox="0 0 24 14"
|
|
49
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
50
|
+
>
|
|
51
|
+
<path
|
|
52
|
+
clipRule="evenodd"
|
|
53
|
+
d="M10.526 12.871L.263 1.676 1.737.324 12 11.52 22.263.324l1.474 1.352L13.474 12.87a2 2 0 01-2.948 0z"
|
|
54
|
+
fillRule="evenodd"
|
|
55
|
+
/>
|
|
56
|
+
</svg>
|
|
57
|
+
</div>
|
|
58
|
+
`;
|
|
59
|
+
|
|
60
|
+
exports[`Icon renders the UI snapshot correctly 3`] = `
|
|
61
|
+
<svg
|
|
62
|
+
aria-hidden={true}
|
|
63
|
+
className="chakra-icon css-7rufou"
|
|
64
|
+
focusable={false}
|
|
65
|
+
id="chakra"
|
|
66
|
+
role="img"
|
|
67
|
+
title="download icon"
|
|
68
|
+
viewBox="0 0 24 24"
|
|
69
|
+
>
|
|
70
|
+
<g
|
|
71
|
+
stroke="currentColor"
|
|
72
|
+
strokeWidth="1.5"
|
|
73
|
+
>
|
|
74
|
+
<path
|
|
75
|
+
d="M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"
|
|
76
|
+
fill="none"
|
|
77
|
+
strokeLinecap="round"
|
|
78
|
+
/>
|
|
79
|
+
<path
|
|
80
|
+
d="M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"
|
|
81
|
+
fill="currentColor"
|
|
82
|
+
strokeLinecap="round"
|
|
83
|
+
/>
|
|
84
|
+
<circle
|
|
85
|
+
cx="12"
|
|
86
|
+
cy="12"
|
|
87
|
+
fill="none"
|
|
88
|
+
r="11.25"
|
|
89
|
+
strokeMiterlimit="10"
|
|
90
|
+
/>
|
|
91
|
+
</g>
|
|
92
|
+
</svg>
|
|
93
|
+
`;
|
|
94
|
+
|
|
95
|
+
exports[`Icon renders the UI snapshot correctly 4`] = `
|
|
96
|
+
<svg
|
|
97
|
+
aria-hidden={true}
|
|
98
|
+
className="chakra-icon css-1grhd2q"
|
|
99
|
+
data-testid="props"
|
|
100
|
+
focusable={false}
|
|
101
|
+
id="props"
|
|
102
|
+
role="img"
|
|
103
|
+
title="download icon"
|
|
104
|
+
viewBox="0 0 24 24"
|
|
105
|
+
>
|
|
106
|
+
<g
|
|
107
|
+
stroke="currentColor"
|
|
108
|
+
strokeWidth="1.5"
|
|
109
|
+
>
|
|
110
|
+
<path
|
|
111
|
+
d="M9,9a3,3,0,1,1,4,2.829,1.5,1.5,0,0,0-1,1.415V14.25"
|
|
112
|
+
fill="none"
|
|
113
|
+
strokeLinecap="round"
|
|
114
|
+
/>
|
|
115
|
+
<path
|
|
116
|
+
d="M12,17.25a.375.375,0,1,0,.375.375A.375.375,0,0,0,12,17.25h0"
|
|
117
|
+
fill="currentColor"
|
|
118
|
+
strokeLinecap="round"
|
|
119
|
+
/>
|
|
120
|
+
<circle
|
|
121
|
+
cx="12"
|
|
122
|
+
cy="12"
|
|
123
|
+
fill="none"
|
|
124
|
+
r="11.25"
|
|
125
|
+
strokeMiterlimit="10"
|
|
126
|
+
/>
|
|
127
|
+
</g>
|
|
128
|
+
</svg>
|
|
129
|
+
`;
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
import { withDesign } from "storybook-addon-designs";
|
|
10
10
|
|
|
11
11
|
import Heading from "../Heading/Heading";
|
|
12
|
+
import { HeadingLevels } from "../Heading/HeadingTypes";
|
|
12
13
|
import Image from "./Image";
|
|
13
14
|
import { ImageRatios, ImageSizes, ImageTypes } from "./ImageTypes";
|
|
14
15
|
import SimpleGrid from "../Grid/SimpleGrid";
|
|
@@ -49,26 +50,26 @@ export const imageBlockStyles = {
|
|
|
49
50
|
description:
|
|
50
51
|
"Alternate text description of the image. Needed for accessibility purposes.",
|
|
51
52
|
},
|
|
53
|
+
aspectRatio: {
|
|
54
|
+
control: { type: "select" },
|
|
55
|
+
table: { defaultValue: { summary: "ImageRatios.Original" } },
|
|
56
|
+
options: ratiosEnumValues.options,
|
|
57
|
+
},
|
|
52
58
|
className: {
|
|
53
59
|
control: false,
|
|
54
60
|
description: "Additional class name for the component to use.",
|
|
55
61
|
},
|
|
56
62
|
component: { control: false },
|
|
57
|
-
|
|
63
|
+
imageType: {
|
|
58
64
|
control: { type: "select" },
|
|
59
|
-
table: { defaultValue: { summary: "
|
|
60
|
-
options:
|
|
65
|
+
table: { defaultValue: { summary: "ImageTypes.Default" } },
|
|
66
|
+
options: typesEnumValues.options,
|
|
61
67
|
},
|
|
62
|
-
|
|
68
|
+
size: {
|
|
63
69
|
control: { type: "select" },
|
|
64
70
|
table: { defaultValue: { summary: "ImageSizes.Default" } },
|
|
65
71
|
options: sizesEnumValues.options,
|
|
66
72
|
},
|
|
67
|
-
imageType: {
|
|
68
|
-
control: { type: "select" },
|
|
69
|
-
table: { defaultValue: { summary: "ImageTypes.Default" } },
|
|
70
|
-
options: typesEnumValues.options,
|
|
71
|
-
},
|
|
72
73
|
src: {
|
|
73
74
|
description:
|
|
74
75
|
"The src attribute is required, and contains the path to the image you want to embed.",
|
|
@@ -81,14 +82,26 @@ export const imageBlockStyles = {
|
|
|
81
82
|
| Component Version | DS Version |
|
|
82
83
|
| ----------------- | ---------- |
|
|
83
84
|
| Added | `0.0.6` |
|
|
84
|
-
| Latest | `0.
|
|
85
|
+
| Latest | `0.26.0` |
|
|
86
|
+
|
|
87
|
+
## Table of Contents
|
|
88
|
+
|
|
89
|
+
- [Overview](#overview)
|
|
90
|
+
- [Component Props](#component-props)
|
|
91
|
+
- [Accessibility](#accessibility)
|
|
92
|
+
- [Image Figure](#image-figure)
|
|
93
|
+
- [Image Sizes](#image-sizes)
|
|
94
|
+
- [Image Aspect Ratios](#image-aspect-ratios)
|
|
95
|
+
- [Image Types](#image-types)
|
|
96
|
+
|
|
97
|
+
## Overview
|
|
85
98
|
|
|
86
99
|
<Description of={Image} />
|
|
87
100
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
101
|
+
If you want a simple HTML `img` element then don't pass in values for the
|
|
102
|
+
`aspectRatio` or `size` props.
|
|
103
|
+
|
|
104
|
+
## Component Props
|
|
92
105
|
|
|
93
106
|
<Canvas>
|
|
94
107
|
<Story
|
|
@@ -98,22 +111,22 @@ export const imageBlockStyles = {
|
|
|
98
111
|
additionalImageStyles: undefined,
|
|
99
112
|
additionalWrapperStyles: undefined,
|
|
100
113
|
alt: "Alt text",
|
|
114
|
+
aspectRatio: "ImageRatios.TwoByOne",
|
|
115
|
+
caption: "Image caption",
|
|
101
116
|
className: undefined,
|
|
102
117
|
component: undefined,
|
|
103
|
-
|
|
104
|
-
imageCaption: "Image caption",
|
|
105
|
-
imageCredit: "Image credit",
|
|
106
|
-
imageSize: "ImageSizes.Medium",
|
|
118
|
+
credit: "Image credit",
|
|
107
119
|
imageType: "ImageTypes.Default",
|
|
120
|
+
size: "ImageSizes.Medium",
|
|
108
121
|
src: "https://placeimg.com/400/300/animals",
|
|
109
122
|
}}
|
|
110
123
|
>
|
|
111
124
|
{(args) => (
|
|
112
125
|
<Image
|
|
113
126
|
{...args}
|
|
114
|
-
|
|
115
|
-
imageSize={sizesEnumValues.getValue(args.imageSize)}
|
|
127
|
+
aspectRatio={ratiosEnumValues.getValue(args.aspectRatio)}
|
|
116
128
|
imageType={typesEnumValues.getValue(args.imageType)}
|
|
129
|
+
size={sizesEnumValues.getValue(args.size)}
|
|
117
130
|
/>
|
|
118
131
|
)}
|
|
119
132
|
</Story>
|
|
@@ -121,11 +134,23 @@ export const imageBlockStyles = {
|
|
|
121
134
|
|
|
122
135
|
<ArgsTable story="Image with Controls" />
|
|
123
136
|
|
|
137
|
+
## Accessibility
|
|
138
|
+
|
|
139
|
+
All images must have an `alt` attribute, even if it's empty. The `alt` prop should
|
|
140
|
+
be used to concisely describe the image. If the image is decorative, then the
|
|
141
|
+
`alt` prop should be an empty string `""`.
|
|
142
|
+
|
|
143
|
+
Resources:
|
|
144
|
+
|
|
145
|
+
- [W3C WAI Images Tutorial](https://www.w3.org/WAI/tutorials/images/)
|
|
146
|
+
- [WebAIM Accessible Images](https://webaim.org/techniques/images/)
|
|
147
|
+
- [Yale Usability & Web Accessibility](https://usability.yale.edu/web-accessibility/articles/images)
|
|
148
|
+
|
|
124
149
|
## Image Figure
|
|
125
150
|
|
|
126
|
-
By passing in `
|
|
151
|
+
By passing in `credit` or `caption`, the `Image` component will
|
|
127
152
|
render an HTML `figure` element and render an `img` element inside with the
|
|
128
|
-
proper props. If no `
|
|
153
|
+
proper props. If no `credit` or `caption` prop values are passed,
|
|
129
154
|
then an `img` element will be rendered with or without wrapper style divs.
|
|
130
155
|
|
|
131
156
|
<Canvas>
|
|
@@ -133,19 +158,19 @@ then an `img` element will be rendered with or without wrapper style divs.
|
|
|
133
158
|
name="Figure and figcaption"
|
|
134
159
|
args={{
|
|
135
160
|
alt: "Alt text",
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
imageSize: ImageSizes.Medium,
|
|
161
|
+
aspectRatio: ImageRatios.ThreeByTwo,
|
|
162
|
+
caption: "Image caption",
|
|
163
|
+
credit: "Image credit",
|
|
140
164
|
imageType: ImageTypes.Default,
|
|
165
|
+
size: ImageSizes.Medium,
|
|
141
166
|
src: "https://placeimg.com/400/300/animals",
|
|
142
167
|
}}
|
|
143
168
|
argTypes={{
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
imageSize: { table: { disable: true } },
|
|
169
|
+
aspectRatio: { table: { disable: true } },
|
|
170
|
+
caption: { table: { disable: true } },
|
|
171
|
+
credit: { table: { disable: true } },
|
|
148
172
|
imageType: { table: { disable: true } },
|
|
173
|
+
size: { table: { disable: true } },
|
|
149
174
|
src: { table: { disable: true } },
|
|
150
175
|
}}
|
|
151
176
|
>
|
|
@@ -155,61 +180,85 @@ then an `img` element will be rendered with or without wrapper style divs.
|
|
|
155
180
|
|
|
156
181
|
## Image Sizes
|
|
157
182
|
|
|
158
|
-
Use the `
|
|
183
|
+
Use the `size` prop to set the desired size with the `ImageSizes` enum.
|
|
159
184
|
|
|
160
185
|
<Canvas>
|
|
161
186
|
<Story name="Image Sizes">
|
|
162
187
|
<SimpleGrid columns={1}>
|
|
163
188
|
<div style={{ textAlign: "center" }}>
|
|
164
|
-
<Heading
|
|
189
|
+
<Heading
|
|
190
|
+
id="ExtraExtraSmall"
|
|
191
|
+
level={HeadingLevels.Four}
|
|
192
|
+
text="ImageSizes.ExtraExtraSmall"
|
|
193
|
+
/>
|
|
165
194
|
<Image
|
|
166
195
|
alt="Alt text"
|
|
167
|
-
|
|
168
|
-
|
|
196
|
+
caption="64px"
|
|
197
|
+
size={ImageSizes.ExtraExtraSmall}
|
|
169
198
|
src="https://placeimg.com/400/300/animals"
|
|
170
199
|
/>
|
|
171
200
|
</div>
|
|
172
201
|
<div style={{ textAlign: "center" }}>
|
|
173
|
-
<Heading
|
|
202
|
+
<Heading
|
|
203
|
+
id="ExtraSmall"
|
|
204
|
+
level={HeadingLevels.Four}
|
|
205
|
+
text="ImageSizes.ExtraSmall"
|
|
206
|
+
/>
|
|
174
207
|
<Image
|
|
175
208
|
alt="Alt text"
|
|
176
|
-
|
|
177
|
-
|
|
209
|
+
caption="96px"
|
|
210
|
+
size={ImageSizes.ExtraSmall}
|
|
178
211
|
src="https://placeimg.com/400/300/animals"
|
|
179
212
|
/>
|
|
180
213
|
</div>
|
|
181
214
|
<div style={{ textAlign: "center" }}>
|
|
182
|
-
<Heading
|
|
215
|
+
<Heading
|
|
216
|
+
id="Small"
|
|
217
|
+
level={HeadingLevels.Four}
|
|
218
|
+
text="ImageSizes.Small"
|
|
219
|
+
/>
|
|
183
220
|
<Image
|
|
184
221
|
alt="Alt text"
|
|
185
|
-
|
|
186
|
-
|
|
222
|
+
caption="165px"
|
|
223
|
+
size={ImageSizes.Small}
|
|
187
224
|
src="https://placeimg.com/400/300/animals"
|
|
188
225
|
/>
|
|
189
226
|
</div>
|
|
190
227
|
<div style={{ textAlign: "center" }}>
|
|
191
|
-
<Heading
|
|
228
|
+
<Heading
|
|
229
|
+
id="Medium"
|
|
230
|
+
level={HeadingLevels.Four}
|
|
231
|
+
text="ImageSizes.Medium"
|
|
232
|
+
/>
|
|
192
233
|
<Image
|
|
193
234
|
alt="Alt text"
|
|
194
|
-
|
|
195
|
-
|
|
235
|
+
caption="225px"
|
|
236
|
+
size={ImageSizes.Medium}
|
|
196
237
|
src="https://placeimg.com/400/300/animals"
|
|
197
238
|
/>
|
|
198
239
|
</div>
|
|
199
240
|
<div style={{ textAlign: "center" }}>
|
|
200
|
-
<Heading
|
|
241
|
+
<Heading
|
|
242
|
+
id="Large"
|
|
243
|
+
level={HeadingLevels.Four}
|
|
244
|
+
text="ImageSizes.Large"
|
|
245
|
+
/>
|
|
201
246
|
<Image
|
|
202
247
|
alt="Alt text"
|
|
203
|
-
|
|
204
|
-
|
|
248
|
+
caption="360px"
|
|
249
|
+
size={ImageSizes.Large}
|
|
205
250
|
src="https://placeimg.com/400/300/animals"
|
|
206
251
|
/>
|
|
207
252
|
</div>
|
|
208
253
|
<div style={{ textAlign: "center" }}>
|
|
209
|
-
<Heading
|
|
254
|
+
<Heading
|
|
255
|
+
id="Default"
|
|
256
|
+
level={HeadingLevels.Four}
|
|
257
|
+
text="ImageSizes.Default"
|
|
258
|
+
/>
|
|
210
259
|
<Image
|
|
211
260
|
alt="Alt text"
|
|
212
|
-
|
|
261
|
+
caption="100%"
|
|
213
262
|
src="https://placeimg.com/400/300/animals"
|
|
214
263
|
/>
|
|
215
264
|
</div>
|
|
@@ -219,8 +268,8 @@ Use the `ImageSizes` prop to set the desired size.
|
|
|
219
268
|
|
|
220
269
|
## Image Aspect Ratios
|
|
221
270
|
|
|
222
|
-
Use the `
|
|
223
|
-
following example has `
|
|
271
|
+
Use the `aspectRatio` prop to set the desired aspect ratio. Note: the
|
|
272
|
+
following example has `size` set to `ImageSizes.Small`.
|
|
224
273
|
|
|
225
274
|
For a better viewing experience, the `Image` components below have been wrapped
|
|
226
275
|
in an element with a fixed width value.
|
|
@@ -229,66 +278,98 @@ in an element with a fixed width value.
|
|
|
229
278
|
<Story name="Image Aspect Ratios">
|
|
230
279
|
<SimpleGrid columns={1}>
|
|
231
280
|
<div style={imageBlockStyles}>
|
|
232
|
-
<Heading
|
|
281
|
+
<Heading
|
|
282
|
+
id="fourbythree"
|
|
283
|
+
level={HeadingLevels.Four}
|
|
284
|
+
text="ImageRatios.FourByThree"
|
|
285
|
+
/>
|
|
233
286
|
<Image
|
|
234
287
|
alt="Alt text"
|
|
235
|
-
|
|
288
|
+
aspectRatio={ImageRatios.FourByThree}
|
|
236
289
|
src="https://placeimg.com/400/300/animals"
|
|
237
290
|
/>
|
|
238
291
|
</div>
|
|
239
292
|
<div style={imageBlockStyles}>
|
|
240
|
-
<Heading
|
|
293
|
+
<Heading
|
|
294
|
+
id="onebytwo"
|
|
295
|
+
level={HeadingLevels.Four}
|
|
296
|
+
text="ImageRatios.OneByTwo"
|
|
297
|
+
/>
|
|
241
298
|
<Image
|
|
242
299
|
alt="Alt text"
|
|
243
|
-
|
|
300
|
+
aspectRatio={ImageRatios.OneByTwo}
|
|
244
301
|
src="https://placeimg.com/400/300/animals"
|
|
245
302
|
/>
|
|
246
303
|
</div>
|
|
247
304
|
<div style={imageBlockStyles}>
|
|
248
|
-
<Heading
|
|
305
|
+
<Heading
|
|
306
|
+
id="original"
|
|
307
|
+
level={HeadingLevels.Four}
|
|
308
|
+
text="ImageRatios.Original"
|
|
309
|
+
/>
|
|
249
310
|
<Image
|
|
250
311
|
alt="Alt text"
|
|
251
|
-
|
|
312
|
+
aspectRatio={ImageRatios.Original}
|
|
252
313
|
src="https://placeimg.com/400/300/animals"
|
|
253
314
|
/>
|
|
254
315
|
</div>
|
|
255
316
|
<div style={imageBlockStyles}>
|
|
256
|
-
<Heading
|
|
317
|
+
<Heading
|
|
318
|
+
id="sixteenbynine"
|
|
319
|
+
level={HeadingLevels.Four}
|
|
320
|
+
text="ImageRatios.SixteenByNine"
|
|
321
|
+
/>
|
|
257
322
|
<Image
|
|
258
323
|
alt="Alt text"
|
|
259
|
-
|
|
324
|
+
aspectRatio={ImageRatios.SixteenByNine}
|
|
260
325
|
src="https://placeimg.com/400/300/animals"
|
|
261
326
|
/>
|
|
262
327
|
</div>
|
|
263
328
|
<div style={imageBlockStyles}>
|
|
264
|
-
<Heading
|
|
329
|
+
<Heading
|
|
330
|
+
id="square"
|
|
331
|
+
level={HeadingLevels.Four}
|
|
332
|
+
text="ImageRatios.Square"
|
|
333
|
+
/>
|
|
265
334
|
<Image
|
|
266
335
|
alt="Alt text"
|
|
267
|
-
|
|
336
|
+
aspectRatio={ImageRatios.Square}
|
|
268
337
|
src="https://placeimg.com/400/300/animals"
|
|
269
338
|
/>
|
|
270
339
|
</div>
|
|
271
340
|
<div style={imageBlockStyles}>
|
|
272
|
-
<Heading
|
|
341
|
+
<Heading
|
|
342
|
+
id="threebyfour"
|
|
343
|
+
level={HeadingLevels.Four}
|
|
344
|
+
text="ImageRatios.ThreeByFour"
|
|
345
|
+
/>
|
|
273
346
|
<Image
|
|
274
347
|
alt="Alt text"
|
|
275
|
-
|
|
348
|
+
aspectRatio={ImageRatios.ThreeByFour}
|
|
276
349
|
src="https://placeimg.com/400/300/animals"
|
|
277
350
|
/>
|
|
278
351
|
</div>
|
|
279
352
|
<div style={imageBlockStyles}>
|
|
280
|
-
<Heading
|
|
353
|
+
<Heading
|
|
354
|
+
id="threebytwo"
|
|
355
|
+
level={HeadingLevels.Four}
|
|
356
|
+
text="ImageRatios.ThreeByTwo"
|
|
357
|
+
/>
|
|
281
358
|
<Image
|
|
282
359
|
alt="Alt text"
|
|
283
|
-
|
|
360
|
+
aspectRatio={ImageRatios.ThreeByTwo}
|
|
284
361
|
src="https://placeimg.com/400/300/animals"
|
|
285
362
|
/>
|
|
286
363
|
</div>
|
|
287
364
|
<div style={imageBlockStyles}>
|
|
288
|
-
<Heading
|
|
365
|
+
<Heading
|
|
366
|
+
id="twobyone"
|
|
367
|
+
level={HeadingLevels.Four}
|
|
368
|
+
text="ImageRatios.TwoByOne"
|
|
369
|
+
/>
|
|
289
370
|
<Image
|
|
290
371
|
alt="Alt text"
|
|
291
|
-
|
|
372
|
+
aspectRatio={ImageRatios.TwoByOne}
|
|
292
373
|
src="https://placeimg.com/400/300/animals"
|
|
293
374
|
/>
|
|
294
375
|
</div>
|
|
@@ -299,7 +380,7 @@ in an element with a fixed width value.
|
|
|
299
380
|
## Image Types
|
|
300
381
|
|
|
301
382
|
Use the `imageType` prop to get an image variant. Note that to get a perfect
|
|
302
|
-
circle, the `
|
|
383
|
+
circle, the `aspectRatio` prop _must_ be set to `ImageRatios.Square`.
|
|
303
384
|
|
|
304
385
|
For a better viewing experience, the `Image` components below have been wrapped
|
|
305
386
|
in an element with a fixed width value.
|
|
@@ -308,19 +389,27 @@ in an element with a fixed width value.
|
|
|
308
389
|
<Story name="Image Types">
|
|
309
390
|
<SimpleGrid columns={1}>
|
|
310
391
|
<div style={imageBlockStyles}>
|
|
311
|
-
<Heading
|
|
392
|
+
<Heading
|
|
393
|
+
id="default"
|
|
394
|
+
level={HeadingLevels.Four}
|
|
395
|
+
text="ImageTypes.Default"
|
|
396
|
+
/>
|
|
312
397
|
<Image
|
|
313
398
|
alt="Alt text"
|
|
314
|
-
|
|
399
|
+
aspectRatio={ImageRatios.Square}
|
|
315
400
|
imageType={ImageTypes.Default}
|
|
316
401
|
src="https://placeimg.com/400/400/animals"
|
|
317
402
|
/>
|
|
318
403
|
</div>
|
|
319
404
|
<div style={imageBlockStyles}>
|
|
320
|
-
<Heading
|
|
405
|
+
<Heading
|
|
406
|
+
id="circle"
|
|
407
|
+
level={HeadingLevels.Four}
|
|
408
|
+
text="ImageTypes.Circle"
|
|
409
|
+
/>
|
|
321
410
|
<Image
|
|
322
411
|
alt="Alt text"
|
|
323
|
-
|
|
412
|
+
aspectRatio={ImageRatios.Square}
|
|
324
413
|
imageType={ImageTypes.Circle}
|
|
325
414
|
src="https://placeimg.com/400/400/animals"
|
|
326
415
|
/>
|