@nypl/design-system-react-components 0.26.1 → 1.0.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 +54 -0
- package/README.md +7 -7
- package/dist/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts +1 -5
- package/dist/components/Button/Button.d.ts +2 -10
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +22 -0
- package/dist/components/Card/Card.d.ts +2 -2
- package/dist/components/Checkbox/Checkbox.d.ts +10 -8
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +1 -1
- package/dist/components/Form/Form.d.ts +2 -2
- package/dist/components/Grid/SimpleGrid.d.ts +6 -3
- package/dist/components/Heading/Heading.d.ts +2 -5
- package/dist/components/HelperErrorText/HelperErrorText.d.ts +1 -5
- package/dist/components/Hero/Hero.d.ts +13 -9
- package/dist/components/Icons/Icon.d.ts +6 -5
- package/dist/components/Icons/IconSvgs.d.ts +21 -21
- package/dist/components/Image/Image.d.ts +8 -5
- package/dist/components/Link/Link.d.ts +1 -9
- package/dist/components/List/List.d.ts +7 -11
- package/dist/components/Logo/Logo.d.ts +2 -5
- package/dist/components/Logo/LogoSvgs.d.ts +39 -39
- package/dist/components/Modal/Modal.d.ts +28 -8
- package/dist/components/Notification/Notification.d.ts +1 -1
- package/dist/components/ProgressIndicator/ProgressIndicator.d.ts +2 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +3 -2
- package/dist/components/Select/Select.d.ts +2 -5
- package/dist/components/SkeletonLoader/SkeletonLoader.d.ts +4 -4
- package/dist/components/SkipNavigation/SkipNavigation.d.ts +17 -0
- package/dist/components/StatusBadge/StatusBadge.d.ts +2 -3
- package/dist/components/StructuredContent/StructuredContent.d.ts +2 -2
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Template/Template.d.ts +2 -0
- package/dist/components/Text/Text.d.ts +1 -1
- package/dist/components/TextInput/TextInput.d.ts +21 -9
- package/dist/components/Toggle/Toggle.d.ts +1 -5
- package/dist/components/VideoPlayer/VideoPlayer.d.ts +2 -1
- package/dist/design-system-react-components.cjs.development.js +983 -1222
- 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 +982 -1285
- package/dist/design-system-react-components.esm.js.map +1 -1
- package/dist/helpers/types.d.ts +1 -0
- package/dist/index.d.ts +27 -48
- package/dist/styles.css +1 -1
- package/dist/theme/components/buttonGroup.d.ts +11 -0
- package/dist/theme/components/card.d.ts +104 -8
- package/dist/theme/components/componentWrapper.d.ts +4 -3
- package/dist/theme/components/customTable.d.ts +11 -14
- package/dist/theme/components/fieldset.d.ts +4 -3
- package/dist/theme/components/helperErrorText.d.ts +4 -3
- package/dist/theme/components/hero.d.ts +1 -1
- package/dist/theme/components/horizontalRule.d.ts +4 -3
- package/dist/theme/components/icon.d.ts +47743 -1
- package/dist/theme/components/image.d.ts +563 -10
- package/dist/theme/components/label.d.ts +4 -3
- package/dist/theme/components/list.d.ts +6 -7
- package/dist/theme/components/logo.d.ts +474 -1
- package/dist/theme/components/notification.d.ts +20 -16
- package/dist/theme/components/progressIndicator.d.ts +6 -4
- package/dist/theme/components/select.d.ts +4 -10
- package/dist/theme/components/skeletonLoader.d.ts +14 -10
- package/dist/theme/components/skipNavigation.d.ts +22 -0
- package/dist/theme/components/slider.d.ts +7 -6
- package/dist/theme/components/structuredContent.d.ts +10 -9
- package/dist/theme/components/text.d.ts +7 -1
- package/dist/theme/components/toggle.d.ts +6 -4
- package/dist/theme/provider.d.ts +2 -4
- package/dist/utils/componentCategories.d.ts +1 -1
- package/dist/utils/interfaces.d.ts +5 -0
- package/dist/utils/utils.d.ts +2 -18
- package/package.json +15 -16
- package/src/__tests__/setup.ts +3 -3
- package/src/__tests__/utils/utils.test.ts +1 -23
- package/src/components/AccessibilityGuide/SkipNavigation.stories.mdx +22 -14
- package/src/components/Accordion/Accordion.stories.mdx +43 -44
- package/src/components/Accordion/Accordion.test.tsx +5 -13
- package/src/components/Accordion/Accordion.tsx +14 -18
- package/src/components/Accordion/__snapshots__/Accordion.test.tsx.snap +6 -6
- package/src/components/Autosuggest/Autosuggest.stories.mdx +1 -1
- package/src/components/Autosuggest/Autosuggest.stories.tsx +23 -25
- package/src/components/Breadcrumbs/Breadcrumbs.stories.mdx +21 -37
- package/src/components/Breadcrumbs/Breadcrumbs.test.tsx +4 -17
- package/src/components/Breadcrumbs/Breadcrumbs.tsx +18 -21
- package/src/components/Breadcrumbs/__snapshots__/Breadcrumbs.test.tsx.snap +1 -100
- package/src/components/Button/Button.stories.mdx +89 -126
- package/src/components/Button/Button.test.tsx +16 -30
- package/src/components/Button/Button.tsx +14 -20
- package/src/components/ButtonGroup/ButtonGroup.stories.mdx +147 -0
- package/src/components/ButtonGroup/ButtonGroup.test.tsx +141 -0
- package/src/components/ButtonGroup/ButtonGroup.tsx +99 -0
- package/src/components/ButtonGroup/__snapshots__/ButtonGroup.test.tsx.snap +117 -0
- package/src/components/Card/Card.stories.mdx +144 -178
- package/src/components/Card/Card.test.tsx +36 -97
- package/src/components/Card/Card.tsx +78 -74
- package/src/components/Chakra/Box.stories.mdx +3 -7
- package/src/components/Chakra/Center.stories.mdx +6 -24
- package/src/components/Chakra/Flex.stories.mdx +5 -7
- package/src/components/Chakra/Grid.stories.mdx +1 -1
- package/src/components/Chakra/Stack.stories.mdx +10 -11
- package/src/components/Checkbox/Checkbox.stories.mdx +1 -1
- package/src/components/Checkbox/Checkbox.test.tsx +2 -2
- package/src/components/Checkbox/Checkbox.tsx +20 -13
- package/src/components/CheckboxGroup/CheckboxGroup.stories.mdx +6 -17
- package/src/components/CheckboxGroup/CheckboxGroup.test.tsx +1 -7
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +33 -29
- package/src/components/CheckboxGroup/__snapshots__/CheckboxGroup.test.tsx.snap +0 -11
- package/src/components/ComponentWrapper/ComponentWrapper.tsx +3 -10
- package/src/components/DatePicker/DatePicker.stories.mdx +23 -37
- package/src/components/DatePicker/DatePicker.test.tsx +21 -19
- package/src/components/DatePicker/DatePicker.tsx +57 -49
- package/src/components/Form/Form.stories.mdx +46 -31
- package/src/components/Form/Form.test.tsx +1 -18
- package/src/components/Form/Form.tsx +7 -7
- package/src/components/Grid/SimpleGrid.stories.mdx +73 -49
- package/src/components/Grid/SimpleGrid.test.tsx +7 -9
- package/src/components/Grid/SimpleGrid.tsx +14 -11
- package/src/components/Heading/Heading.stories.mdx +27 -72
- package/src/components/Heading/Heading.test.tsx +18 -44
- package/src/components/Heading/Heading.tsx +7 -10
- package/src/components/HelperErrorText/HelperErrorText.stories.mdx +1 -3
- package/src/components/HelperErrorText/HelperErrorText.tsx +1 -5
- package/src/components/Hero/Hero.stories.mdx +219 -216
- package/src/components/Hero/Hero.test.tsx +107 -223
- package/src/components/Hero/Hero.tsx +63 -61
- package/src/components/Icons/Icon.stories.mdx +172 -118
- package/src/components/Icons/Icon.test.tsx +8 -16
- package/src/components/Icons/Icon.tsx +75 -29
- package/src/components/Icons/IconSvgs.tsx +42 -42
- package/src/components/Image/Image.stories.mdx +45 -132
- package/src/components/Image/Image.test.tsx +16 -31
- package/src/components/Image/Image.tsx +28 -12
- package/src/components/Link/Link.stories.mdx +30 -94
- package/src/components/Link/Link.test.tsx +25 -75
- package/src/components/Link/Link.tsx +43 -56
- package/src/components/Link/__snapshots__/Link.test.tsx.snap +1 -2
- package/src/components/List/List.stories.mdx +20 -31
- package/src/components/List/List.test.tsx +24 -43
- package/src/components/List/List.tsx +25 -36
- package/src/components/Logo/Logo.stories.mdx +94 -50
- package/src/components/Logo/Logo.test.tsx +10 -19
- package/src/components/Logo/Logo.tsx +50 -17
- package/src/components/Logo/LogoSvgs.tsx +78 -78
- package/src/components/Logo/__snapshots__/Logo.test.tsx.snap +4 -4
- package/src/components/Modal/Modal.stories.mdx +245 -139
- package/src/components/Modal/Modal.test.tsx +147 -10
- package/src/components/Modal/Modal.tsx +140 -20
- package/src/components/Modal/__snapshots__/Modal.test.tsx.snap +25 -0
- package/src/components/Notification/Notification.stories.mdx +10 -28
- package/src/components/Notification/Notification.test.tsx +9 -12
- package/src/components/Notification/Notification.tsx +34 -37
- package/src/components/Pagination/Pagination.stories.mdx +3 -4
- package/src/components/Pagination/Pagination.tsx +15 -10
- package/src/components/ProgressIndicator/ProgressIndicator.stories.mdx +27 -53
- package/src/components/ProgressIndicator/ProgressIndicator.test.tsx +9 -10
- package/src/components/ProgressIndicator/ProgressIndicator.tsx +17 -21
- package/src/components/ProgressIndicator/__snapshots__/ProgressIndicator.test.tsx.snap +0 -10
- package/src/components/Radio/Radio.stories.mdx +1 -1
- package/src/components/Radio/Radio.tsx +9 -6
- package/src/components/RadioGroup/RadioGroup.stories.mdx +15 -16
- package/src/components/RadioGroup/RadioGroup.test.tsx +2 -8
- package/src/components/RadioGroup/RadioGroup.tsx +28 -24
- package/src/components/SearchBar/SearchBar.stories.mdx +4 -4
- package/src/components/SearchBar/SearchBar.test.tsx +1 -1
- package/src/components/SearchBar/SearchBar.tsx +14 -22
- package/src/components/SearchBar/__snapshots__/SearchBar.test.tsx.snap +1 -13
- package/src/components/Select/Select.stories.mdx +10 -25
- package/src/components/Select/Select.test.tsx +6 -7
- package/src/components/Select/Select.tsx +28 -35
- package/src/components/Select/__snapshots__/Select.test.tsx.snap +24 -24
- package/src/components/SkeletonLoader/SkeletonLoader.stories.mdx +17 -56
- package/src/components/SkeletonLoader/SkeletonLoader.test.tsx +7 -21
- package/src/components/SkeletonLoader/SkeletonLoader.tsx +9 -8
- package/src/components/SkeletonLoader/__snapshots__/SkeletonLoader.test.tsx.snap +33 -33
- package/src/components/SkipNavigation/SkipNavigation.stories.mdx +90 -0
- package/src/components/SkipNavigation/SkipNavigation.test.tsx +63 -0
- package/src/components/SkipNavigation/SkipNavigation.tsx +51 -0
- package/src/components/SkipNavigation/__snapshots__/SkipNavigation.test.tsx.snap +130 -0
- package/src/components/Slider/Slider.stories.mdx +19 -53
- package/src/components/Slider/Slider.test.tsx +2 -2
- package/src/components/Slider/Slider.tsx +10 -12
- package/src/components/Slider/__snapshots__/Slider.test.tsx.snap +2 -9
- package/src/components/StatusBadge/StatusBadge.stories.mdx +6 -21
- package/src/components/StatusBadge/StatusBadge.test.tsx +2 -3
- package/src/components/StatusBadge/StatusBadge.tsx +3 -10
- package/src/components/StructuredContent/StructuredContent.stories.mdx +30 -58
- package/src/components/StructuredContent/StructuredContent.test.tsx +42 -44
- package/src/components/StructuredContent/StructuredContent.tsx +9 -18
- package/src/components/StyleGuide/Bidirectionality.stories.mdx +9 -23
- package/src/components/StyleGuide/Buttons.stories.mdx +63 -63
- package/src/components/StyleGuide/ColorCard.tsx +2 -4
- package/src/components/StyleGuide/Colors.stories.mdx +9 -10
- package/src/components/StyleGuide/DesignTokens.stories.mdx +5 -7
- package/src/components/StyleGuide/Forms.stories.mdx +2 -2
- package/src/components/StyleGuide/Iconography.stories.mdx +60 -78
- package/src/components/StyleGuide/Spacing.stories.mdx +1 -2
- package/src/components/StyleGuide/Typography.stories.mdx +16 -19
- package/src/components/Table/Table.stories.mdx +85 -1
- package/src/components/Table/Table.test.tsx +57 -1
- package/src/components/Table/Table.tsx +7 -4
- package/src/components/Table/__snapshots__/Table.test.tsx.snap +121 -0
- package/src/components/Tabs/Tabs.stories.mdx +1 -1
- package/src/components/Tabs/Tabs.test.tsx +2 -2
- package/src/components/Tabs/Tabs.tsx +26 -27
- package/src/components/Template/Template.stories.mdx +49 -54
- package/src/components/Template/Template.tsx +9 -3
- package/src/components/Text/Text.stories.mdx +5 -11
- package/src/components/Text/Text.test.tsx +3 -6
- package/src/components/Text/Text.tsx +3 -5
- package/src/components/TextInput/TextInput.stories.mdx +10 -22
- package/src/components/TextInput/TextInput.test.tsx +32 -62
- package/src/components/TextInput/TextInput.tsx +61 -30
- package/src/components/TextInput/__snapshots__/TextInput.test.tsx.snap +1 -0
- package/src/components/Toggle/Toggle.stories.mdx +5 -16
- package/src/components/Toggle/Toggle.test.tsx +2 -3
- package/src/components/Toggle/Toggle.tsx +9 -10
- package/src/components/VideoPlayer/VideoPlayer.stories.mdx +13 -29
- package/src/components/VideoPlayer/VideoPlayer.test.tsx +18 -23
- package/src/components/VideoPlayer/VideoPlayer.tsx +13 -10
- package/src/docs/Chakra.stories.mdx +14 -11
- package/src/docs/Welcome.stories.mdx +23 -43
- package/src/helpers/types.ts +1 -0
- package/src/hooks/tests/useNYPLTheme.test.tsx +1 -1
- package/src/hooks/useNYPLTheme.stories.mdx +3 -6
- package/src/index.ts +52 -46
- package/src/styles.scss +0 -1
- package/src/theme/components/buttonGroup.ts +10 -0
- package/src/theme/components/card.ts +50 -15
- package/src/theme/components/componentWrapper.ts +5 -1
- package/src/theme/components/customTable.ts +8 -2
- package/src/theme/components/fieldset.ts +5 -1
- package/src/theme/components/helperErrorText.ts +5 -1
- package/src/theme/components/hero.ts +2 -2
- package/src/theme/components/horizontalRule.ts +5 -1
- package/src/theme/components/icon.ts +7 -1
- package/src/theme/components/image.ts +14 -3
- package/src/theme/components/label.ts +5 -1
- package/src/theme/components/list.ts +8 -2
- package/src/theme/components/logo.ts +5 -1
- package/src/theme/components/notification.ts +38 -14
- package/src/theme/components/progressIndicator.ts +10 -5
- package/src/theme/components/select.ts +5 -6
- package/src/theme/components/skeletonLoader.ts +8 -2
- package/src/theme/components/skipNavigation.ts +26 -0
- package/src/theme/components/slider.ts +13 -1
- package/src/theme/components/structuredContent.ts +11 -1
- package/src/theme/components/text.ts +12 -5
- package/src/theme/components/toggle.ts +9 -3
- package/src/theme/foundations/colors.ts +6 -9
- package/src/theme/index.ts +4 -0
- package/src/theme/provider.tsx +1 -1
- package/src/utils/componentCategories.ts +13 -5
- package/src/utils/interfaces.ts +5 -0
- package/src/utils/utils.ts +2 -32
- package/dist/components/Accordion/AccordionTypes.d.ts +0 -5
- package/dist/components/Breadcrumbs/BreadcrumbsTypes.d.ts +0 -8
- package/dist/components/Button/ButtonTypes.d.ts +0 -8
- package/dist/components/DatePicker/DatePickerTypes.d.ts +0 -5
- package/dist/components/Form/FormTypes.d.ts +0 -2
- package/dist/components/Grid/GridTypes.d.ts +0 -9
- package/dist/components/Heading/HeadingTypes.d.ts +0 -14
- package/dist/components/Hero/HeroTypes.d.ts +0 -12
- package/dist/components/Icons/IconTypes.d.ts +0 -77
- package/dist/components/Image/ImageTypes.d.ts +0 -22
- package/dist/components/Link/LinkTypes.d.ts +0 -8
- package/dist/components/List/ListTypes.d.ts +0 -5
- package/dist/components/Logo/LogoTypes.d.ts +0 -54
- package/dist/components/Notification/NotificationTypes.d.ts +0 -5
- package/dist/components/ProgressIndicator/ProgressIndicatorTypes.d.ts +0 -8
- package/dist/components/Select/SelectTypes.d.ts +0 -8
- package/dist/components/SkeletonLoader/SkeletonLoaderTypes.d.ts +0 -5
- package/dist/components/StatusBadge/StatusBadgeTypes.d.ts +0 -5
- package/dist/components/StructuredContent/StructuredContentTypes.d.ts +0 -5
- package/dist/components/Text/TextTypes.d.ts +0 -6
- package/dist/components/TextInput/TextInputTypes.d.ts +0 -25
- package/dist/components/Toggle/ToggleTypes.d.ts +0 -4
- package/dist/components/VideoPlayer/VideoPlayerTypes.d.ts +0 -9
- package/dist/helpers/enums.d.ts +0 -4
- package/dist/utils/siteSections.d.ts +0 -2
- package/src/components/Accordion/AccordionTypes.tsx +0 -5
- package/src/components/Breadcrumbs/BreadcrumbsTypes.tsx +0 -8
- package/src/components/Button/ButtonTypes.tsx +0 -8
- package/src/components/DatePicker/DatePickerTypes.tsx +0 -5
- package/src/components/Form/FormTypes.tsx +0 -3
- package/src/components/Grid/GridTypes.tsx +0 -9
- package/src/components/Heading/HeadingTypes.tsx +0 -15
- package/src/components/Hero/HeroTypes.tsx +0 -20
- package/src/components/Icons/IconTypes.tsx +0 -83
- package/src/components/Image/ImageTypes.ts +0 -24
- package/src/components/Link/LinkTypes.tsx +0 -8
- package/src/components/List/ListTypes.tsx +0 -5
- package/src/components/Logo/LogoTypes.tsx +0 -56
- package/src/components/Modal/_Modal.scss +0 -18
- package/src/components/Notification/NotificationTypes.tsx +0 -5
- package/src/components/ProgressIndicator/ProgressIndicatorTypes.ts +0 -8
- package/src/components/Select/SelectTypes.tsx +0 -10
- package/src/components/SkeletonLoader/SkeletonLoaderTypes.tsx +0 -5
- package/src/components/StatusBadge/StatusBadgeTypes.tsx +0 -5
- package/src/components/StructuredContent/StructuredContentTypes.tsx +0 -5
- package/src/components/Text/TextTypes.tsx +0 -6
- package/src/components/TextInput/TextInputTypes.tsx +0 -48
- package/src/components/Toggle/ToggleTypes.tsx +0 -4
- package/src/components/VideoPlayer/VideoPlayerTypes.tsx +0 -10
- package/src/helpers/enums.ts +0 -4
- package/src/utils/siteSections.ts +0 -10
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VStack } from "@chakra-ui/react";
|
|
2
2
|
import {
|
|
3
3
|
ArgsTable,
|
|
4
4
|
Canvas,
|
|
@@ -9,19 +9,43 @@ import {
|
|
|
9
9
|
import { withDesign } from "storybook-addon-designs";
|
|
10
10
|
|
|
11
11
|
import Button, { ButtonElementType } from "./Button";
|
|
12
|
-
import
|
|
12
|
+
import ButtonGroup from "../ButtonGroup/ButtonGroup";
|
|
13
13
|
import Icon from "../Icons/Icon";
|
|
14
|
-
import {
|
|
15
|
-
IconAlign,
|
|
16
|
-
IconNames,
|
|
17
|
-
IconRotationTypes,
|
|
18
|
-
IconSizes,
|
|
19
|
-
} from "../Icons/IconTypes";
|
|
20
14
|
import { getCategory } from "../../utils/componentCategories";
|
|
21
15
|
import DSProvider from "../../theme/provider";
|
|
22
|
-
import { getStorybookEnumValues } from "../../utils/utils";
|
|
23
16
|
|
|
24
|
-
export const
|
|
17
|
+
export const iconNames = [
|
|
18
|
+
"accessibilityFull",
|
|
19
|
+
"accessibilityPartial",
|
|
20
|
+
"actionCheckCircle",
|
|
21
|
+
"actionHelpDefault",
|
|
22
|
+
"actionHelpOutline",
|
|
23
|
+
"alertNotificationImportant",
|
|
24
|
+
"actionLaunch",
|
|
25
|
+
"arrow",
|
|
26
|
+
"check",
|
|
27
|
+
"clock",
|
|
28
|
+
"close",
|
|
29
|
+
"download",
|
|
30
|
+
"errorFilled",
|
|
31
|
+
"errorOutline",
|
|
32
|
+
"fileTypeAudio",
|
|
33
|
+
"fileTypeDoc",
|
|
34
|
+
"fileTypeGenericDoc",
|
|
35
|
+
"fileTypeImage",
|
|
36
|
+
"fileTypePdf",
|
|
37
|
+
"fileTypeSpreadsheet",
|
|
38
|
+
"fileTypeVideo",
|
|
39
|
+
"headset",
|
|
40
|
+
"minus",
|
|
41
|
+
"plus",
|
|
42
|
+
"search",
|
|
43
|
+
"speakerNotes",
|
|
44
|
+
"utilityAccountFilled",
|
|
45
|
+
"utilityAccountUnfilled",
|
|
46
|
+
"utilityHamburger",
|
|
47
|
+
"utilitySearch",
|
|
48
|
+
];
|
|
25
49
|
|
|
26
50
|
<Meta
|
|
27
51
|
title={getCategory("Button")}
|
|
@@ -35,13 +59,9 @@ export const enumValues = getStorybookEnumValues(ButtonTypes, "ButtonTypes");
|
|
|
35
59
|
jest: ["Button.test.tsx"],
|
|
36
60
|
}}
|
|
37
61
|
argTypes={{
|
|
38
|
-
additionalStyles: { control: false },
|
|
39
|
-
attributes: { control: false },
|
|
40
62
|
buttonText: { description: "Only used for Storybook" },
|
|
41
63
|
buttonType: {
|
|
42
|
-
|
|
43
|
-
table: { defaultValue: { summary: "ButtonTypes.Primary" } },
|
|
44
|
-
options: enumValues.options,
|
|
64
|
+
table: { defaultValue: { summary: "primary" } },
|
|
45
65
|
},
|
|
46
66
|
className: { control: false },
|
|
47
67
|
displayIcon: { description: "Only used for Storybook." },
|
|
@@ -50,7 +70,7 @@ export const enumValues = getStorybookEnumValues(ButtonTypes, "ButtonTypes");
|
|
|
50
70
|
},
|
|
51
71
|
iconType: {
|
|
52
72
|
control: { type: "select" },
|
|
53
|
-
options:
|
|
73
|
+
options: iconNames,
|
|
54
74
|
description: "Select the icon. Only used for Storybook.",
|
|
55
75
|
},
|
|
56
76
|
id: { control: false },
|
|
@@ -65,7 +85,7 @@ export const enumValues = getStorybookEnumValues(ButtonTypes, "ButtonTypes");
|
|
|
65
85
|
| Component Version | DS Version |
|
|
66
86
|
| ----------------- | ---------- |
|
|
67
87
|
| Added | `0.0.4` |
|
|
68
|
-
| Latest | `0.
|
|
88
|
+
| Latest | `0.28.0` |
|
|
69
89
|
|
|
70
90
|
## Table of Contents
|
|
71
91
|
|
|
@@ -84,13 +104,13 @@ export const enumValues = getStorybookEnumValues(ButtonTypes, "ButtonTypes");
|
|
|
84
104
|
Update the `buttonType` in the Controls section to see the types of buttons
|
|
85
105
|
that can be rendered.
|
|
86
106
|
|
|
87
|
-
- `
|
|
88
|
-
- `
|
|
89
|
-
- `
|
|
90
|
-
- `
|
|
91
|
-
- `
|
|
92
|
-
- `
|
|
93
|
-
|
|
107
|
+
- `"primary"` is used for actions that move the user forward. This is the default.
|
|
108
|
+
- `"secondary"` is used for actions that move the user back, such as cancellations.
|
|
109
|
+
- `"callout"` is used for call to action text such as "Donate".
|
|
110
|
+
- `"pill"` is used for equally weighted actions within cards and always in a set.
|
|
111
|
+
- `"link"` is used for equally weighted actions in a text based list.
|
|
112
|
+
- `"noBrand"` is a variant used when there is no brand and will display the
|
|
113
|
+
background color as black.
|
|
94
114
|
|
|
95
115
|
When one and only one `Icon` component is passed inside a `Button` component with
|
|
96
116
|
no text, it will automatically be configured to use the `"iconOnly"` type.
|
|
@@ -101,14 +121,12 @@ no text, it will automatically be configured to use the `"iconOnly"` type.
|
|
|
101
121
|
<Story
|
|
102
122
|
name="Button with Controls"
|
|
103
123
|
args={{
|
|
104
|
-
additionalStyles: undefined,
|
|
105
|
-
attributes: undefined,
|
|
106
124
|
buttonText: "Button Text",
|
|
107
|
-
buttonType: "
|
|
125
|
+
buttonType: "primary",
|
|
108
126
|
className: undefined,
|
|
109
127
|
displayIcon: false,
|
|
110
128
|
displayIconLeft: true,
|
|
111
|
-
iconType:
|
|
129
|
+
iconType: "search",
|
|
112
130
|
id: "button-id",
|
|
113
131
|
isDisabled: false,
|
|
114
132
|
mouseDown: undefined,
|
|
@@ -118,9 +136,7 @@ no text, it will automatically be configured to use the `"iconOnly"` type.
|
|
|
118
136
|
>
|
|
119
137
|
{(args) => (
|
|
120
138
|
<Button
|
|
121
|
-
|
|
122
|
-
attributes={args.attributes}
|
|
123
|
-
buttonType={enumValues.getValue(args.buttonType)}
|
|
139
|
+
buttonType={args.buttonType}
|
|
124
140
|
className={args.className}
|
|
125
141
|
id={args.id}
|
|
126
142
|
isDisabled={args.isDisabled}
|
|
@@ -129,19 +145,11 @@ no text, it will automatically be configured to use the `"iconOnly"` type.
|
|
|
129
145
|
type={args.type}
|
|
130
146
|
>
|
|
131
147
|
{args.displayIcon && args.displayIconLeft && (
|
|
132
|
-
<Icon
|
|
133
|
-
name={args.iconType}
|
|
134
|
-
align={IconAlign.Left}
|
|
135
|
-
size={IconSizes.Small}
|
|
136
|
-
/>
|
|
148
|
+
<Icon name={args.iconType} align="left" size="small" />
|
|
137
149
|
)}
|
|
138
150
|
{args.buttonText}
|
|
139
151
|
{args.displayIcon && !args.displayIconLeft && (
|
|
140
|
-
<Icon
|
|
141
|
-
name={args.iconType}
|
|
142
|
-
align={IconAlign.Right}
|
|
143
|
-
size={IconSizes.Small}
|
|
144
|
-
/>
|
|
152
|
+
<Icon name={args.iconType} align="right" size="small" />
|
|
145
153
|
)}
|
|
146
154
|
</Button>
|
|
147
155
|
)}
|
|
@@ -168,18 +176,15 @@ Resources:
|
|
|
168
176
|
## Button Groups
|
|
169
177
|
|
|
170
178
|
Primary and secondary buttons should be grouped like in the following example.
|
|
171
|
-
The `ButtonGroup` component
|
|
172
|
-
be used to wrap the `Button` component.
|
|
179
|
+
The `ButtonGroup` component should be used to wrap the `Button` component.
|
|
173
180
|
|
|
174
181
|
<Canvas>
|
|
175
182
|
<Story name="Button Groups">
|
|
176
183
|
<ButtonGroup>
|
|
177
|
-
<Button buttonType=
|
|
184
|
+
<Button buttonType="secondary" id="group-1">
|
|
178
185
|
Button
|
|
179
186
|
</Button>
|
|
180
|
-
<Button
|
|
181
|
-
Submit
|
|
182
|
-
</Button>
|
|
187
|
+
<Button id="group-2">Submit</Button>
|
|
183
188
|
</ButtonGroup>
|
|
184
189
|
</Story>
|
|
185
190
|
</Canvas>
|
|
@@ -187,27 +192,19 @@ be used to wrap the `Button` component.
|
|
|
187
192
|
## With Icons
|
|
188
193
|
|
|
189
194
|
The `Icon` component collaborates great with the `Button` component. Check out
|
|
190
|
-
[`src/components/Icons/
|
|
191
|
-
to see the full list of icon
|
|
195
|
+
[`src/components/Icons/Icon.tsx`](https://github.com/NYPL/nypl-design-system/blob/development/src/components/Icons/Icon.tsx)
|
|
196
|
+
to see the full list of icon names that can be rendered.
|
|
192
197
|
|
|
193
198
|
<Canvas>
|
|
194
199
|
<Story name="With Icon">
|
|
195
200
|
<VStack align="left" spacing="input.group.button.vstack" width="150px">
|
|
196
201
|
<Button id="icon-1">
|
|
197
|
-
<Icon
|
|
198
|
-
name={IconNames.Search}
|
|
199
|
-
align={IconAlign.Left}
|
|
200
|
-
size={IconSizes.Small}
|
|
201
|
-
/>
|
|
202
|
+
<Icon name="search" align="left" size="small" />
|
|
202
203
|
Button Text
|
|
203
204
|
</Button>
|
|
204
205
|
<Button id="icon-2">
|
|
205
206
|
Button Text
|
|
206
|
-
<Icon
|
|
207
|
-
name={IconNames.Search}
|
|
208
|
-
align={IconAlign.Right}
|
|
209
|
-
size={IconSizes.Small}
|
|
210
|
-
/>
|
|
207
|
+
<Icon name="search" align="right" size="small" />
|
|
211
208
|
</Button>
|
|
212
209
|
</VStack>
|
|
213
210
|
</Story>
|
|
@@ -218,22 +215,17 @@ The icon can be placed to the left or the right of the button text.
|
|
|
218
215
|
<Canvas>
|
|
219
216
|
<DSProvider>
|
|
220
217
|
<ButtonGroup>
|
|
221
|
-
<Button buttonType=
|
|
222
|
-
<Icon
|
|
223
|
-
name={IconNames.Arrow}
|
|
224
|
-
iconRotation={IconRotationTypes.Rotate90}
|
|
225
|
-
align={IconAlign.Left}
|
|
226
|
-
size={IconSizes.Small}
|
|
227
|
-
/>
|
|
218
|
+
<Button buttonType="secondary" id="icon-left">
|
|
219
|
+
<Icon name="arrow" iconRotation="rotate90" align="left" size="small" />
|
|
228
220
|
Previous
|
|
229
221
|
</Button>
|
|
230
|
-
<Button buttonType=
|
|
222
|
+
<Button buttonType="secondary" id="icon-right">
|
|
231
223
|
Next
|
|
232
224
|
<Icon
|
|
233
|
-
name=
|
|
234
|
-
iconRotation=
|
|
235
|
-
align=
|
|
236
|
-
size=
|
|
225
|
+
name="arrow"
|
|
226
|
+
iconRotation="rotate270"
|
|
227
|
+
align="right"
|
|
228
|
+
size="small"
|
|
237
229
|
/>
|
|
238
230
|
</Button>
|
|
239
231
|
</ButtonGroup>
|
|
@@ -241,46 +233,19 @@ The icon can be placed to the left or the right of the button text.
|
|
|
241
233
|
</Canvas>
|
|
242
234
|
|
|
243
235
|
Text in a button is optional if an icon is rendered, but make sure that there
|
|
244
|
-
is an `aria-label` passed to the `Button` component
|
|
245
|
-
`attributes={{ "aria-label": "Previous" }}`
|
|
236
|
+
is an `aria-label` passed to the `Button` component `aria-label="Previous"`.
|
|
246
237
|
|
|
247
238
|
<Canvas>
|
|
248
239
|
<DSProvider>
|
|
249
240
|
<ButtonGroup>
|
|
250
|
-
<Button
|
|
251
|
-
|
|
252
|
-
"aria-label": "Previous",
|
|
253
|
-
}}
|
|
254
|
-
buttonType={ButtonTypes.Secondary}
|
|
255
|
-
id="prev-btn"
|
|
256
|
-
>
|
|
257
|
-
<Icon
|
|
258
|
-
name={IconNames.Arrow}
|
|
259
|
-
iconRotation={IconRotationTypes.Rotate90}
|
|
260
|
-
size={IconSizes.Small}
|
|
261
|
-
/>
|
|
241
|
+
<Button aria-label="Previous" buttonType="secondary" id="prev-btn">
|
|
242
|
+
<Icon name="arrow" iconRotation="rotate90" size="small" />
|
|
262
243
|
</Button>
|
|
263
|
-
<Button
|
|
264
|
-
|
|
265
|
-
"aria-label": "Next",
|
|
266
|
-
}}
|
|
267
|
-
buttonType={ButtonTypes.Secondary}
|
|
268
|
-
id="next-btn"
|
|
269
|
-
>
|
|
270
|
-
<Icon
|
|
271
|
-
name={IconNames.Arrow}
|
|
272
|
-
iconRotation={IconRotationTypes.Rotate270}
|
|
273
|
-
size={IconSizes.Small}
|
|
274
|
-
/>
|
|
244
|
+
<Button aria-label="Next" buttonType="secondary" id="next-btn">
|
|
245
|
+
<Icon name="arrow" iconRotation="rotate270" size="small" />
|
|
275
246
|
</Button>
|
|
276
|
-
<Button
|
|
277
|
-
|
|
278
|
-
"aria-label": "Close",
|
|
279
|
-
}}
|
|
280
|
-
buttonType={ButtonTypes.Secondary}
|
|
281
|
-
id="close-btn"
|
|
282
|
-
>
|
|
283
|
-
<Icon name={IconNames.Close} size={IconSizes.Small} />
|
|
247
|
+
<Button aria-label="Close" buttonType="secondary" id="close-btn">
|
|
248
|
+
<Icon name="close" size="small" />
|
|
284
249
|
</Button>
|
|
285
250
|
</ButtonGroup>
|
|
286
251
|
</DSProvider>
|
|
@@ -289,23 +254,23 @@ is an `aria-label` passed to the `Button` component through the `attributes` pro
|
|
|
289
254
|
## Patterns
|
|
290
255
|
|
|
291
256
|
Buttons are blue by default but should be red when it is intended to be used as
|
|
292
|
-
a call out. The "Back to Top" button must be of `
|
|
257
|
+
a call out. The "Back to Top" button must be of `buttonType="secondary"` and
|
|
293
258
|
must include an up arrow icon on the right side.
|
|
294
259
|
|
|
295
260
|
<Canvas>
|
|
296
261
|
<Story name="Patterns">
|
|
297
262
|
<ButtonGroup>
|
|
298
|
-
<Button buttonType=
|
|
263
|
+
<Button buttonType="callout" id="donate-btn">
|
|
299
264
|
Donate to this library
|
|
300
265
|
</Button>
|
|
301
|
-
<Button buttonType=
|
|
266
|
+
<Button buttonType="secondary" id="top-btn">
|
|
302
267
|
Back to Top
|
|
303
268
|
<Icon
|
|
304
|
-
name=
|
|
305
|
-
iconRotation=
|
|
306
|
-
size=
|
|
269
|
+
name="arrow"
|
|
270
|
+
iconRotation="rotate180"
|
|
271
|
+
size="small"
|
|
307
272
|
className="right"
|
|
308
|
-
align=
|
|
273
|
+
align="right"
|
|
309
274
|
/>
|
|
310
275
|
</Button>
|
|
311
276
|
</ButtonGroup>
|
|
@@ -314,28 +279,26 @@ must include an up arrow icon on the right side.
|
|
|
314
279
|
|
|
315
280
|
## Other Examples
|
|
316
281
|
|
|
317
|
-
The
|
|
282
|
+
The variations modified by the `buttonType` prop:
|
|
318
283
|
|
|
319
284
|
<Canvas>
|
|
320
285
|
<DSProvider>
|
|
321
286
|
<ButtonGroup>
|
|
322
|
-
<Button
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
<Button buttonType={ButtonTypes.Secondary} id="secondary-btn">
|
|
326
|
-
Secondary
|
|
287
|
+
<Button id="primary-btn">primary</Button>
|
|
288
|
+
<Button buttonType="secondary" id="secondary-btn">
|
|
289
|
+
secondary
|
|
327
290
|
</Button>
|
|
328
|
-
<Button buttonType=
|
|
329
|
-
|
|
291
|
+
<Button buttonType="callout" id="callout-btn">
|
|
292
|
+
callout
|
|
330
293
|
</Button>
|
|
331
|
-
<Button buttonType=
|
|
332
|
-
|
|
294
|
+
<Button buttonType="pill" id="pill-btn">
|
|
295
|
+
pill
|
|
333
296
|
</Button>
|
|
334
|
-
<Button buttonType=
|
|
335
|
-
|
|
297
|
+
<Button buttonType="link" id="link-btn">
|
|
298
|
+
link
|
|
336
299
|
</Button>
|
|
337
|
-
<Button buttonType=
|
|
338
|
-
|
|
300
|
+
<Button buttonType="noBrand" id="nobrand-btn">
|
|
301
|
+
noBrand
|
|
339
302
|
</Button>
|
|
340
303
|
</ButtonGroup>
|
|
341
304
|
</DSProvider>
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
render,
|
|
4
|
+
RenderResult,
|
|
5
|
+
screen,
|
|
6
|
+
fireEvent,
|
|
7
|
+
} from "@testing-library/react";
|
|
3
8
|
import { axe } from "jest-axe";
|
|
4
9
|
import userEvent from "@testing-library/user-event";
|
|
5
10
|
import renderer from "react-test-renderer";
|
|
6
11
|
|
|
7
12
|
import Button from "./Button";
|
|
8
13
|
import Icon from "../Icons/Icon";
|
|
9
|
-
import { IconAlign, IconNames, IconSizes } from "../Icons/IconTypes";
|
|
10
|
-
import { ButtonTypes } from "./ButtonTypes";
|
|
11
14
|
|
|
12
15
|
describe("Button Accessibility", () => {
|
|
13
16
|
it("passes axe accessibility test", async () => {
|
|
@@ -22,17 +25,16 @@ describe("Button Accessibility", () => {
|
|
|
22
25
|
});
|
|
23
26
|
|
|
24
27
|
describe("Button", () => {
|
|
25
|
-
let onClick
|
|
26
|
-
let
|
|
28
|
+
let onClick: jest.MockedFunction<() => void>;
|
|
29
|
+
let utils: RenderResult;
|
|
27
30
|
|
|
28
31
|
beforeEach(() => {
|
|
29
32
|
onClick = jest.fn();
|
|
30
|
-
|
|
33
|
+
utils = render(
|
|
31
34
|
<Button id="button" onClick={onClick}>
|
|
32
35
|
Submit
|
|
33
36
|
</Button>
|
|
34
37
|
);
|
|
35
|
-
rerender = utils.rerender;
|
|
36
38
|
});
|
|
37
39
|
|
|
38
40
|
it("calls the onClick", () => {
|
|
@@ -47,7 +49,7 @@ describe("Button", () => {
|
|
|
47
49
|
|
|
48
50
|
it("optionally calls the onClick on mouseDown instead of on click", () => {
|
|
49
51
|
expect(onClick).toHaveBeenCalledTimes(0);
|
|
50
|
-
rerender(
|
|
52
|
+
utils.rerender(
|
|
51
53
|
<Button id="button5" mouseDown={true}>
|
|
52
54
|
Submit
|
|
53
55
|
</Button>
|
|
@@ -87,11 +89,7 @@ describe("padding for icon only button", () => {
|
|
|
87
89
|
const onClick = jest.fn();
|
|
88
90
|
const { container } = render(
|
|
89
91
|
<Button id="button" onClick={onClick} type="button">
|
|
90
|
-
<Icon
|
|
91
|
-
align={IconAlign.Left}
|
|
92
|
-
name={IconNames.Check}
|
|
93
|
-
size={IconSizes.Small}
|
|
94
|
-
/>
|
|
92
|
+
<Icon align="left" name="check" size="small" />
|
|
95
93
|
</Button>
|
|
96
94
|
);
|
|
97
95
|
expect(container.querySelector("button svg")).toBeInTheDocument();
|
|
@@ -126,47 +124,35 @@ describe("Button Snapshot", () => {
|
|
|
126
124
|
.toJSON();
|
|
127
125
|
const secondary = renderer
|
|
128
126
|
.create(
|
|
129
|
-
<Button
|
|
130
|
-
id="button"
|
|
131
|
-
onClick={jest.fn()}
|
|
132
|
-
buttonType={ButtonTypes.Secondary}
|
|
133
|
-
>
|
|
127
|
+
<Button id="button" onClick={jest.fn()} buttonType="secondary">
|
|
134
128
|
Seconday
|
|
135
129
|
</Button>
|
|
136
130
|
)
|
|
137
131
|
.toJSON();
|
|
138
132
|
const callout = renderer
|
|
139
133
|
.create(
|
|
140
|
-
<Button
|
|
141
|
-
id="button"
|
|
142
|
-
onClick={jest.fn()}
|
|
143
|
-
buttonType={ButtonTypes.Callout}
|
|
144
|
-
>
|
|
134
|
+
<Button id="button" onClick={jest.fn()} buttonType="callout">
|
|
145
135
|
Callout
|
|
146
136
|
</Button>
|
|
147
137
|
)
|
|
148
138
|
.toJSON();
|
|
149
139
|
const pill = renderer
|
|
150
140
|
.create(
|
|
151
|
-
<Button id="button" onClick={jest.fn()} buttonType=
|
|
141
|
+
<Button id="button" onClick={jest.fn()} buttonType="pill">
|
|
152
142
|
Pill
|
|
153
143
|
</Button>
|
|
154
144
|
)
|
|
155
145
|
.toJSON();
|
|
156
146
|
const link = renderer
|
|
157
147
|
.create(
|
|
158
|
-
<Button id="button" onClick={jest.fn()} buttonType=
|
|
148
|
+
<Button id="button" onClick={jest.fn()} buttonType="link">
|
|
159
149
|
Link
|
|
160
150
|
</Button>
|
|
161
151
|
)
|
|
162
152
|
.toJSON();
|
|
163
153
|
const noBrand = renderer
|
|
164
154
|
.create(
|
|
165
|
-
<Button
|
|
166
|
-
id="button"
|
|
167
|
-
onClick={jest.fn()}
|
|
168
|
-
buttonType={ButtonTypes.NoBrand}
|
|
169
|
-
>
|
|
155
|
+
<Button id="button" onClick={jest.fn()} buttonType="noBrand">
|
|
170
156
|
NoBrand
|
|
171
157
|
</Button>
|
|
172
158
|
)
|
|
@@ -5,18 +5,19 @@ import {
|
|
|
5
5
|
} from "@chakra-ui/react";
|
|
6
6
|
import * as React from "react";
|
|
7
7
|
|
|
8
|
-
import { ButtonTypes } from "./ButtonTypes";
|
|
9
8
|
import Icon from "../Icons/Icon";
|
|
10
|
-
import { getVariant } from "../../utils/utils";
|
|
11
9
|
|
|
12
10
|
export type ButtonElementType = "submit" | "button" | "reset";
|
|
11
|
+
export type ButtonTypes =
|
|
12
|
+
| "primary"
|
|
13
|
+
| "secondary"
|
|
14
|
+
| "callout"
|
|
15
|
+
| "pill"
|
|
16
|
+
| "link"
|
|
17
|
+
| "noBrand";
|
|
13
18
|
|
|
14
19
|
interface ButtonProps {
|
|
15
|
-
/**
|
|
16
|
-
additionalStyles?: { [key: string]: any };
|
|
17
|
-
/** Additional attributes passed to the button. */
|
|
18
|
-
attributes?: { [key: string]: any };
|
|
19
|
-
/** The kind of button assigned through the `ButtonTypes` enum. */
|
|
20
|
+
/** The button variation to render based on the `ButtonTypes` type.*/
|
|
20
21
|
buttonType?: ButtonTypes;
|
|
21
22
|
/** Additional className to use. */
|
|
22
23
|
className?: string;
|
|
@@ -38,9 +39,7 @@ interface ButtonProps {
|
|
|
38
39
|
*/
|
|
39
40
|
export const Button = chakra((props: React.PropsWithChildren<ButtonProps>) => {
|
|
40
41
|
const {
|
|
41
|
-
|
|
42
|
-
attributes,
|
|
43
|
-
buttonType,
|
|
42
|
+
buttonType = "primary",
|
|
44
43
|
children,
|
|
45
44
|
className = "",
|
|
46
45
|
id,
|
|
@@ -53,7 +52,7 @@ export const Button = chakra((props: React.PropsWithChildren<ButtonProps>) => {
|
|
|
53
52
|
const btnCallback = mouseDown ? { onMouseDown: onClick } : { onClick };
|
|
54
53
|
let childCount = 0;
|
|
55
54
|
let hasIcon = false;
|
|
56
|
-
let variant;
|
|
55
|
+
let variant: string | ButtonTypes = buttonType;
|
|
57
56
|
let styles = {};
|
|
58
57
|
|
|
59
58
|
if (!id) {
|
|
@@ -62,13 +61,10 @@ export const Button = chakra((props: React.PropsWithChildren<ButtonProps>) => {
|
|
|
62
61
|
);
|
|
63
62
|
}
|
|
64
63
|
|
|
65
|
-
React.Children.map(children, (child: React.ReactElement) => {
|
|
64
|
+
React.Children.map(children as JSX.Element, (child: React.ReactElement) => {
|
|
66
65
|
childCount++;
|
|
67
66
|
if (child !== undefined && child !== null) {
|
|
68
|
-
if (
|
|
69
|
-
child.type === Icon ||
|
|
70
|
-
(child.props && child.props.mdxType === "Icon")
|
|
71
|
-
) {
|
|
67
|
+
if (child.type === Icon || child?.props?.mdxType === "Icon") {
|
|
72
68
|
hasIcon = true;
|
|
73
69
|
}
|
|
74
70
|
}
|
|
@@ -76,11 +72,10 @@ export const Button = chakra((props: React.PropsWithChildren<ButtonProps>) => {
|
|
|
76
72
|
|
|
77
73
|
if (childCount === 1 && hasIcon) {
|
|
78
74
|
variant = "iconOnly";
|
|
79
|
-
} else {
|
|
80
|
-
variant = getVariant(buttonType, ButtonTypes, ButtonTypes.Primary);
|
|
81
75
|
}
|
|
82
76
|
|
|
83
77
|
styles = useStyleConfig("Button", { variant });
|
|
78
|
+
|
|
84
79
|
return (
|
|
85
80
|
<ChakraButton
|
|
86
81
|
id={id}
|
|
@@ -88,9 +83,8 @@ export const Button = chakra((props: React.PropsWithChildren<ButtonProps>) => {
|
|
|
88
83
|
className={className}
|
|
89
84
|
type={type}
|
|
90
85
|
isDisabled={isDisabled}
|
|
91
|
-
{...attributes}
|
|
92
86
|
{...btnCallback}
|
|
93
|
-
__css={
|
|
87
|
+
__css={styles}
|
|
94
88
|
{...rest}
|
|
95
89
|
>
|
|
96
90
|
{children}
|