@thecb/components 10.12.3-beta.0 → 10.12.3-beta.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/README.md +0 -4
- package/dist/index.cjs.js +2526 -1617
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +4 -5
- package/dist/index.esm.js +2527 -1617
- package/dist/index.esm.js.map +1 -1
- package/package.json +13 -25
- package/src/components/atoms/alert/Alert.stories.js +26 -148
- package/src/components/atoms/badge/Badge.js +2 -2
- package/src/components/atoms/badge/Badge.stories.js +29 -143
- package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +29 -38
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +55 -108
- package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +31 -160
- package/src/components/atoms/checkbox/Checkbox.stories.js +29 -148
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +27 -61
- package/src/components/atoms/detail/Detail.js +26 -0
- package/src/components/atoms/display-box/DisplayBox.stories.js +21 -65
- package/src/components/atoms/display-card/DisplayCard.stories.js +22 -163
- package/src/components/atoms/dropdown/Dropdown.stories.js +10 -91
- package/src/components/atoms/form-layouts/FormInput.stories.js +26 -212
- package/src/components/atoms/form-select/FormSelect.stories.js +29 -55
- package/src/components/atoms/formatted-address/FormattedAddress.stories.js +27 -133
- package/src/components/atoms/icons/icons.stories.js +116 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +34 -110
- package/src/components/atoms/line-item/LineItem.stories.js +22 -89
- package/src/components/atoms/link/Link.stories.js +49 -155
- package/src/components/atoms/loading-line/LoadingLine.js +10 -14
- package/src/components/atoms/loading-line/LoadingLine.stories.js +28 -132
- package/src/components/atoms/nav-footer/NavFooter.stories.js +22 -235
- package/src/components/atoms/nav-header/NavHeader.stories.js +21 -122
- package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +44 -108
- package/src/components/atoms/placeholder/Placeholder.stories.js +36 -164
- package/src/components/atoms/searchable-select/SearchableSelect.stories.js +28 -103
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +40 -65
- package/src/components/atoms/table/Table.stories.js +75 -59
- package/src/components/atoms/table/TableRow.js +0 -1
- package/src/components/atoms/title/Title.js +23 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +20 -103
- package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +5 -8
- package/src/components/molecules/address-form/AddressForm.stories.js +20 -223
- package/src/components/molecules/banner/Banner.stories.js +26 -122
- package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +19 -203
- package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +61 -210
- package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +24 -0
- package/src/components/molecules/index.js +0 -1
- package/src/components/molecules/link-card/LinkCard.stories.js +72 -287
- package/src/components/molecules/login-form/LoginForm.stories.js +21 -117
- package/src/components/molecules/modal/Modal.stories.js +128 -342
- package/src/components/molecules/module/Module.stories.js +25 -267
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +61 -295
- package/src/components/molecules/multiple-select-filter/{MultipleSelectFilter.oldstories.js → MultipleSelectFilter.stories.js} +1 -1
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +4 -4
- package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +24 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +85 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +23 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +144 -0
- package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +67 -0
- package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +38 -0
- package/src/components/molecules/multiple-select-filter/__private__/useKeyboardNavigation.js +84 -0
- package/src/components/molecules/multiple-select-filter/__private__/util.js +31 -0
- package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +1 -1
- package/src/components/molecules/pagination/Pagination.stories.js +28 -177
- package/src/components/molecules/tabs/Tabs.stories.js +227 -135
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +105 -0
- package/src/hooks/use-outside-click/index.js +4 -5
- package/src/util/index.js +1 -3
- package/src/components/atoms/alert/Alert.mdx +0 -19
- package/src/components/atoms/badge/Badge.mdx +0 -27
- package/src/components/atoms/breadcrumb/Breadcrumb.mdx +0 -21
- package/src/components/atoms/button-with-link/ButtonWithLink.mdx +0 -21
- package/src/components/atoms/card/Card.mdx +0 -41
- package/src/components/atoms/card/Card.stories.js +0 -360
- package/src/components/atoms/checkbox/Checkbox.mdx +0 -15
- package/src/components/atoms/checkbox/Checkbox.oldstories.js +0 -30
- package/src/components/atoms/country-dropdown/CountryDropdown.mdx +0 -36
- package/src/components/atoms/detail/Detail.mdx +0 -32
- package/src/components/atoms/detail/Detail.stories.js +0 -156
- package/src/components/atoms/display-box/DisplayBox.mdx +0 -11
- package/src/components/atoms/display-card/DisplayCard.mdx +0 -13
- package/src/components/atoms/dropdown/Dropdown.mdx +0 -65
- package/src/components/atoms/form-layouts/FormInput.mdx +0 -38
- package/src/components/atoms/form-select/FormSelect.mdx +0 -42
- package/src/components/atoms/formatted-address/FormattedAddress.mdx +0 -13
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.mdx +0 -17
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.stories.js +0 -57
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.mdx +0 -40
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.stories.js +0 -74
- package/src/components/atoms/icons/Icons.mdx +0 -40
- package/src/components/atoms/icons/Icons.stories.js +0 -325
- package/src/components/atoms/labeled-amount/LabeledAmount.mdx +0 -23
- package/src/components/atoms/line-item/LineItem.mdx +0 -28
- package/src/components/atoms/link/Link.mdx +0 -19
- package/src/components/atoms/loading/Loading.mdx +0 -13
- package/src/components/atoms/loading/Loading.stories.js +0 -22
- package/src/components/atoms/loading-line/LoadingLine.mdx +0 -15
- package/src/components/atoms/nav-footer/NavFooter.mdx +0 -15
- package/src/components/atoms/nav-header/NavHeader.mdx +0 -13
- package/src/components/atoms/nav-tabs/NavTabs.mdx +0 -30
- package/src/components/atoms/nav-tabs/NavTabs.stories.js +0 -49
- package/src/components/atoms/password-requirements/PasswordRequirements.mdx +0 -39
- package/src/components/atoms/placeholder/Placeholder.mdx +0 -19
- package/src/components/atoms/searchable-select/SearchableSelect.mdx +0 -44
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +0 -36
- package/src/components/atoms/table/Table.mdx +0 -71
- package/src/components/atoms/table/Table.oldstories.js +0 -84
- package/src/components/atoms/title/Title.mdx +0 -26
- package/src/components/atoms/title/Title.stories.js +0 -144
- package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +0 -17
- package/src/components/atoms/typeahead-input/TypeaheadInput.mdx +0 -13
- package/src/components/atoms/typeahead-input/TypeaheadInput.stories.js +0 -63
- package/src/components/molecules/address-form/AddressForm.mdx +0 -18
- package/src/components/molecules/banner/Banner.mdx +0 -23
- package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +0 -15
- package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +0 -15
- package/src/components/molecules/edit-name-form/EditNameForm.mdx +0 -13
- package/src/components/molecules/edit-name-form/EditNameForm.stories.js +0 -117
- package/src/components/molecules/idle-modal/IdleModal.js +0 -101
- package/src/components/molecules/idle-modal/IdleModal.mdx +0 -17
- package/src/components/molecules/idle-modal/IdleModal.stories.js +0 -180
- package/src/components/molecules/idle-modal/index.d.ts +0 -16
- package/src/components/molecules/idle-modal/index.js +0 -3
- package/src/components/molecules/link-card/LinkCard.mdx +0 -17
- package/src/components/molecules/login-form/LoginForm.mdx +0 -16
- package/src/components/molecules/modal/Modal.mdx +0 -17
- package/src/components/molecules/module/Module.mdx +0 -17
- package/src/components/molecules/obligation/Obligation.mdx +0 -23
- package/src/components/molecules/obligation/Obligation.stories.js +0 -460
- package/src/components/molecules/pagination/Pagination.mdx +0 -15
- package/src/components/molecules/popover/Popover.mdx +0 -15
- package/src/components/molecules/popover/Popover.stories.js +0 -220
- package/src/components/molecules/tabs/Tabs.mdx +0 -17
- package/src/components/molecules/toast-notification/Toast.mdx +0 -15
- package/src/components/molecules/toast-notification/Toast.stories.js +0 -183
- package/src/stories/Button.stories.ts +0 -53
- package/src/stories/Button.tsx +0 -48
- package/src/stories/Configure.mdx +0 -364
- package/src/stories/Header.stories.ts +0 -33
- package/src/stories/Header.tsx +0 -56
- package/src/stories/Page.stories.ts +0 -32
- package/src/stories/Page.tsx +0 -73
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +0 -5
- package/src/stories/assets/addon-library.png +0 -0
- package/src/stories/assets/assets.png +0 -0
- package/src/stories/assets/avif-test-image.avif +0 -0
- package/src/stories/assets/context.png +0 -0
- package/src/stories/assets/discord.svg +0 -15
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +0 -3
- package/src/stories/assets/share.png +0 -0
- package/src/stories/assets/styling.png +0 -0
- package/src/stories/assets/testing.png +0 -0
- package/src/stories/assets/theming.png +0 -0
- package/src/stories/assets/tutorials.svg +0 -12
- package/src/stories/assets/youtube.svg +0 -4
- package/src/stories/button.css +0 -30
- package/src/stories/header.css +0 -32
- package/src/stories/page.css +0 -69
- package/src/util/idleTimerUtils.js +0 -36
- /package/src/components/atoms/add-obligation/{AddObligation.oldstories.js → AddObligation.stories.js} +0 -0
- /package/src/components/atoms/amount-callout/{AmountCallout.oldstories.js → AmountCallout.stories.js} +0 -0
- /package/src/components/atoms/checkbox-list/{CheckboxList.oldstories.js → CheckboxList.stories.js} +0 -0
- /package/src/components/atoms/form-layouts/{FormLayouts.oldstories.js → FormLayouts.stories.js} +0 -0
- /package/src/components/atoms/hamburger-button/{HamburgerButton.oldstories.js → HamburgerButton.stories.js} +0 -0
- /package/src/components/atoms/heading/{Heading.oldstories.js → Heading.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/box-example/{BoxExample.oldstories.js → BoxExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/center-example/{CenterExample.oldstories.js → CenterExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cluster-example/{ClusterExample.oldstories.js → ClusterExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cover-example/{CoverExample.oldstories.js → CoverExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/frame-example/{FrameExample.oldstories.js → FrameExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/grid-example/{GridExample.oldstories.js → GridExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/imposter-example/{ImposterExample.oldstories.js → ImposterExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/motion-example/{MotionExample.oldstories.js → MotionExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/reel-example/{ReelExample.oldstories.js → ReelExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/sidebar-example/{SidebarExample.oldstories.js → SidebarExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/stack-example/{StackExample.oldstories.js → StackExample.stories.js} +0 -0
- /package/src/components/atoms/layouts/examples/switcher-example/{SwitcherExample.oldstories.js → SwitcherExample.stories.js} +0 -0
- /package/src/components/atoms/paragraph/{Paragraph.oldstories.js → Paragraph.stories.js} +0 -0
- /package/src/components/atoms/processing-fee/{ProcessingFee.oldstories.js → ProcessingFee.stories.js} +0 -0
- /package/src/components/atoms/search/{Search.oldstories.js → Search.stories.js} +0 -0
- /package/src/components/atoms/solid-divider/{SolidDivider.oldstories.js → SolidDivider.stories.js} +0 -0
- /package/src/components/atoms/sortable-table-heading/{SortableTableHeading.oldstories.js → SortableTableHeading.stories.js} +0 -0
- /package/src/components/atoms/spinner/{Spinner.oldstories.js → Spinner.stories.js} +0 -0
- /package/src/components/atoms/tab/{Tab.oldstories.js → Tab.stories.js} +0 -0
- /package/src/components/atoms/text/{Text.oldstories.js → Text.stories.js} +0 -0
- /package/src/components/atoms/typeahead-input/{TypeaheadIinput.oldstories.js → TypeaheadIinput.stories.js} +0 -0
- /package/src/components/atoms/wallet-name/{WalletName.oldstories.js → WalletName.stories.js} +0 -0
- /package/src/components/molecules/account-and-routing-modal/{AccountAndRoutingModal.oldstories.js → AccountAndRoutingModal.stories.js} +0 -0
- /package/src/components/molecules/editable-list/{EditableList.oldstories.js → EditableList.stories.js} +0 -0
- /package/src/components/molecules/email-form/{EmailForm.oldstories.js → EmailForm.stories.js} +0 -0
- /package/src/components/molecules/forgot-password-form/{ForgotPasswordForm.oldstories.js → ForgotPasswordForm.stories.js} +0 -0
- /package/src/components/molecules/highlight-tab-row/{HighlightTabRow.oldstories.js → HighlightTabRow.stories.js} +0 -0
- /package/src/components/molecules/obligation/modules/{AmountModule.oldstories.js → AmountModule.stories.js} +0 -0
- /package/src/components/molecules/payment-button-bar/{PaymentButtonBar.oldstories.js → PaymentButtonBar.stories.js} +0 -0
- /package/src/components/molecules/payment-details/{PaymentDetails.oldstories.js → PaymentDetails.stories.js} +0 -0
- /package/src/components/molecules/payment-form-ach/{PaymentFormACH.oldstories.js → PaymentFormACH.stories.js} +0 -0
- /package/src/components/molecules/payment-form-card/{PaymentFormCard.oldstories.js → PaymentFormCard.stories.js} +0 -0
- /package/src/components/molecules/periscope-dashboard-iframe/{PeriscopeDashBoardIframe.oldstories.js → PeriscopeDashBoardIframe.stories.js} +0 -0
- /package/src/components/molecules/phone-form/{PhoneForm.oldstories.js → PhoneForm.stories.js} +0 -0
- /package/src/components/molecules/popup-menu/{PopupMenu.oldstories.js → PopupMenu.stories.js} +0 -0
- /package/src/components/molecules/radio-group/{RadioGroup.oldstories.js → RadioGroup.stories.js} +0 -0
- /package/src/components/molecules/radio-section/{RadioSection.oldstories.js → RadioSection.stories.js} +0 -0
- /package/src/components/molecules/registration-form/{RegistrationForm.oldstories.js → RegistrationForm.stories.js} +0 -0
- /package/src/components/molecules/reset-confirmation-form/{ResetConfirmationForm.oldstories.js → ResetConfirmationForm.stories.js} +0 -0
- /package/src/components/molecules/reset-password-form/{ResetPasswordForm.oldstories.js → ResetPasswordForm.stories.js} +0 -0
- /package/src/components/molecules/reset-password-success/{ResetPasswordSuccess.oldstories.js → ResetPasswordSuccess.stories.js} +0 -0
- /package/src/components/molecules/tab-sidebar/{TabSidebar.oldstories.js → TabSidebar.stories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions/{TermsAndConditions.oldstories.js → TermsAndConditions.stories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions-modal/{TermsAndConditionsModal.oldstories.js → TermsAndConditionsModal.stories.js} +0 -0
- /package/src/components/molecules/workflow-tile/{WorkflowTile.oldstories.js → WorkflowTile.stories.js} +0 -0
|
@@ -1,149 +1,241 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { Box, Center, Cover } from "../../atoms/layouts";
|
|
3
|
-
import Tabs from "./Tabs";
|
|
4
|
-
import { fn } from "@storybook/test";
|
|
5
|
-
import PaymentFormCard from "../payment-form-card";
|
|
6
|
-
import * as PaymentFormCardState from "../payment-form-card/PaymentFormCard.state";
|
|
7
|
-
import { connect, Provider } from "react-redux";
|
|
8
2
|
import { createStore } from "redux";
|
|
3
|
+
import Tabs from "./Tabs";
|
|
9
4
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
import page from "../../../../.storybook/page";
|
|
6
|
+
import Text from "../../atoms/text";
|
|
7
|
+
|
|
8
|
+
import { createFormState, onlyIntegers, required } from "redux-freeform";
|
|
9
|
+
import DisplayBox from "../../atoms/display-box";
|
|
10
|
+
import { Box } from "../../atoms/layouts";
|
|
11
|
+
|
|
12
|
+
// Including commented out configs as a preliminary work for
|
|
13
|
+
// https://citybase.atlassian.net/browse/KCORE-2973
|
|
14
|
+
// https://citybase.atlassian.net/browse/KCORE-2974
|
|
15
|
+
// https://citybase.atlassian.net/browse/KCORE-2975
|
|
16
|
+
|
|
17
|
+
const ButtonTest = () => (
|
|
18
|
+
<DisplayBox>
|
|
19
|
+
<Text>Test Button Clicks</Text>
|
|
20
|
+
<Box>
|
|
21
|
+
<button onClick={() => console.log("BUTTON TEST;")}>Click me</button>
|
|
22
|
+
</Box>
|
|
23
|
+
</DisplayBox>
|
|
13
24
|
);
|
|
14
25
|
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
26
|
+
//const creditCardFormConfig = {
|
|
27
|
+
// amount: {
|
|
28
|
+
// defaultValue: "100.00",
|
|
29
|
+
// validators: [required()]
|
|
30
|
+
// }
|
|
31
|
+
//};
|
|
19
32
|
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
layout: "centered"
|
|
33
|
+
const checkFormConfig = {
|
|
34
|
+
amount: {
|
|
35
|
+
defaultValue: "100.00",
|
|
36
|
+
validators: [required()]
|
|
25
37
|
},
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
tabsConfig: undefined,
|
|
29
|
-
tabsDisplayMode: undefined
|
|
38
|
+
name: {
|
|
39
|
+
validators: [required()]
|
|
30
40
|
},
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
description:
|
|
34
|
-
"Object containing an array of tabs to show, along with their label, active state, and associated content",
|
|
35
|
-
table: {
|
|
36
|
-
type: { summary: "object" },
|
|
37
|
-
defaultValue: { summary: undefined }
|
|
38
|
-
}
|
|
39
|
-
},
|
|
40
|
-
tabsDisplayMode: {
|
|
41
|
-
description:
|
|
42
|
-
"Whether to display tabs in horizontal or vertical configuration. Use 'horizontal' for horitzontal config. All other values will result in vertical configuration.",
|
|
43
|
-
table: {
|
|
44
|
-
type: { summary: "string" },
|
|
45
|
-
defaultValue: { summary: undefined }
|
|
46
|
-
}
|
|
47
|
-
}
|
|
41
|
+
accountNumber: {
|
|
42
|
+
validators: [onlyIntegers()]
|
|
48
43
|
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
)
|
|
55
|
-
]
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export default meta;
|
|
59
|
-
|
|
60
|
-
export const HoriztonalTabs = {
|
|
61
|
-
args: {
|
|
62
|
-
tabsConfig: {
|
|
63
|
-
tabs: [
|
|
64
|
-
{
|
|
65
|
-
label: "Credit Card",
|
|
66
|
-
active: true,
|
|
67
|
-
content: (
|
|
68
|
-
<ConnectedPaymentFormCard
|
|
69
|
-
variant="checkout"
|
|
70
|
-
hideTitle
|
|
71
|
-
hideZipCode
|
|
72
|
-
fields={{
|
|
73
|
-
...PaymentFormCardState.mapStateToProps(store.getState())
|
|
74
|
-
}}
|
|
75
|
-
{...PaymentFormCardState.mapDispatchToProps(store.dispatch)}
|
|
76
|
-
fees={{
|
|
77
|
-
label: "Service Fee",
|
|
78
|
-
type: "FLAT",
|
|
79
|
-
value: 0
|
|
80
|
-
}}
|
|
81
|
-
showWalletCheckbox
|
|
82
|
-
saveToWallet={fn()}
|
|
83
|
-
walletCheckboxMarked
|
|
84
|
-
termsContent={"terms"}
|
|
85
|
-
termsTitle={"Terms and Conditions"}
|
|
86
|
-
/>
|
|
87
|
-
)
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
label: "ACH Payment",
|
|
91
|
-
active: true,
|
|
92
|
-
content: (
|
|
93
|
-
<Box minWidth="500px" minHeight="400px">
|
|
94
|
-
<Center>
|
|
95
|
-
<Cover singleChild>ACH Payment Form</Cover>
|
|
96
|
-
</Center>
|
|
97
|
-
</Box>
|
|
98
|
-
)
|
|
99
|
-
}
|
|
100
|
-
]
|
|
101
|
-
},
|
|
102
|
-
tabsDisplayMode: "horizontal"
|
|
44
|
+
routingNumber: {
|
|
45
|
+
validators: [onlyIntegers()]
|
|
46
|
+
},
|
|
47
|
+
checkType: {
|
|
48
|
+
defaultValue: "Personal"
|
|
103
49
|
}
|
|
104
50
|
};
|
|
105
51
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
52
|
+
//const cashFormConfig = {
|
|
53
|
+
// amount: {
|
|
54
|
+
// defaultValue: "100.00",
|
|
55
|
+
// validators: [required()]
|
|
56
|
+
// }
|
|
57
|
+
//};
|
|
58
|
+
//
|
|
59
|
+
//const MyCreditCardForm = ({ actions, fields }) => {
|
|
60
|
+
// return (
|
|
61
|
+
// <div>
|
|
62
|
+
// {fields.amount.hasErrors && fields.amount.errors.includes(required.error)
|
|
63
|
+
// ? "Amount"
|
|
64
|
+
// : "Amount"}
|
|
65
|
+
// <input
|
|
66
|
+
// value={fields.amount.rawValue}
|
|
67
|
+
// onChange={evt => actions.fields.amount.set(evt.target.value)}
|
|
68
|
+
// type="text"
|
|
69
|
+
// />
|
|
70
|
+
// </div>
|
|
71
|
+
// );
|
|
72
|
+
//};
|
|
73
|
+
|
|
74
|
+
const MyCheckForm = ({ actions, fields }) => (
|
|
75
|
+
<div>
|
|
76
|
+
{fields.amount.hasErrors && fields.amount.errors.includes(required.error)
|
|
77
|
+
? "AmountError"
|
|
78
|
+
: "Amount"}
|
|
79
|
+
<input
|
|
80
|
+
value={fields.amount.rawValue}
|
|
81
|
+
onChange={evt => actions.fields.amount.set(evt.target.value)}
|
|
82
|
+
type="text"
|
|
83
|
+
/>
|
|
84
|
+
{fields.name.hasErrors && fields.name.errors.includes(required.error)
|
|
85
|
+
? "Name Error"
|
|
86
|
+
: "Name"}
|
|
87
|
+
<input
|
|
88
|
+
value={fields.name.rawValue}
|
|
89
|
+
onChange={evt => actions.fields.name.set(evt.target.value)}
|
|
90
|
+
type="text"
|
|
91
|
+
/>
|
|
92
|
+
{fields.accountNumber.hasErrors &&
|
|
93
|
+
fields.accountNumber.errors.includes(required.error)
|
|
94
|
+
? "Account Number Error"
|
|
95
|
+
: "Account Number"}
|
|
96
|
+
<input
|
|
97
|
+
value={fields.accountNumber.rawValue}
|
|
98
|
+
onChange={evt => actions.fields.accountNumber.set(evt.target.value)}
|
|
99
|
+
type="text"
|
|
100
|
+
/>
|
|
101
|
+
{fields.routingNumber.hasErrors &&
|
|
102
|
+
fields.routingNumber.errors.includes(required.error)
|
|
103
|
+
? "Routing Number Error"
|
|
104
|
+
: "Routing Number"}
|
|
105
|
+
<input
|
|
106
|
+
value={fields.routingNumber.rawValue}
|
|
107
|
+
onChange={evt => actions.fields.routingNumber.set(evt.target.value)}
|
|
108
|
+
type="text"
|
|
109
|
+
/>
|
|
110
|
+
{fields.checkType.hasErrors &&
|
|
111
|
+
fields.checkType.errors.includes(required.error)
|
|
112
|
+
? "Check Type Error"
|
|
113
|
+
: "Check Type"}
|
|
114
|
+
<input
|
|
115
|
+
value={fields.checkType.rawValue}
|
|
116
|
+
onChange={evt => actions.fields.checkType.set(evt.target.value)}
|
|
117
|
+
type="text"
|
|
118
|
+
/>
|
|
119
|
+
</div>
|
|
120
|
+
);
|
|
121
|
+
|
|
122
|
+
//const MyCashForm = ({ actions, fields }) => (
|
|
123
|
+
// <div>
|
|
124
|
+
// {fields.amount.hasErrors && fields.amount.errors.includes(required.error)
|
|
125
|
+
// ? "Amount Error"
|
|
126
|
+
// : "Amount"}
|
|
127
|
+
// <input
|
|
128
|
+
// value={fields.amount.rawValue}
|
|
129
|
+
// onChange={evt => actions.fields.amount.set(evt.target.value)}
|
|
130
|
+
// type="text"
|
|
131
|
+
// />
|
|
132
|
+
// </div>
|
|
133
|
+
//);
|
|
134
|
+
|
|
135
|
+
//const {
|
|
136
|
+
// reducer: cardReducer,
|
|
137
|
+
// mapStateToProps: cardMapStateToProps,
|
|
138
|
+
// mapDispatchToProps: cardMapDispatchToProps
|
|
139
|
+
//} = createFormState(creditCardFormConfig);
|
|
140
|
+
|
|
141
|
+
const {
|
|
142
|
+
reducer: checkReducer,
|
|
143
|
+
mapStateToProps: checkMapStateToProps,
|
|
144
|
+
mapDispatchToProps: checkMapDispatchToProps
|
|
145
|
+
} = createFormState(checkFormConfig);
|
|
146
|
+
|
|
147
|
+
//const {
|
|
148
|
+
// reducer: cashReducer,
|
|
149
|
+
// mapStateToProps: cashMapStateToProps,
|
|
150
|
+
// mapDispatchToProps: cashMapDispatchToProps
|
|
151
|
+
//} = createFormState(cashFormConfig);
|
|
152
|
+
|
|
153
|
+
//const cardStore = createStore(
|
|
154
|
+
// cardReducer,
|
|
155
|
+
// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
|
156
|
+
//);
|
|
157
|
+
|
|
158
|
+
const checkStore = createStore(
|
|
159
|
+
checkReducer,
|
|
160
|
+
window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
|
161
|
+
);
|
|
162
|
+
|
|
163
|
+
//const cashStore = createStore(
|
|
164
|
+
// cashReducer,
|
|
165
|
+
// window.__REDUX_DEVTOOLS_EXTENSION__ && window.__REDUX_DEVTOOLS_EXTENSION__()
|
|
166
|
+
//);
|
|
167
|
+
|
|
168
|
+
//const tabsConfig = {
|
|
169
|
+
// tabs: [
|
|
170
|
+
// {
|
|
171
|
+
// label: 'Credit Card',
|
|
172
|
+
// active: true,
|
|
173
|
+
// content: MyCreditCardForm(
|
|
174
|
+
// {...cardMapStateToProps(cardStore.getState())},
|
|
175
|
+
// {...cardMapDispatchToProps(cardStore.dispatch)}
|
|
176
|
+
// )
|
|
177
|
+
// },
|
|
178
|
+
// {
|
|
179
|
+
// label: 'Check',
|
|
180
|
+
// active: true,
|
|
181
|
+
// content: MyCheckForm(
|
|
182
|
+
// {...checkMapStateToProps(checkStore.getState())},
|
|
183
|
+
// {...checkMapDispatchToProps(checkStore.dispatch)}
|
|
184
|
+
// )
|
|
185
|
+
// },
|
|
186
|
+
// {
|
|
187
|
+
// true: 'Cash',
|
|
188
|
+
// active: true,
|
|
189
|
+
// content: MyCashForm(
|
|
190
|
+
// {...cashMapStateToProps(cashStore.getState())},
|
|
191
|
+
// {...cashMapDispatchToProps(cashStore.dispatch)}
|
|
192
|
+
// )
|
|
193
|
+
// }
|
|
194
|
+
// ]
|
|
195
|
+
//};
|
|
196
|
+
|
|
197
|
+
const LOREM = `
|
|
198
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit,
|
|
199
|
+
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
|
200
|
+
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
|
|
201
|
+
nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in
|
|
202
|
+
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
|
|
203
|
+
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia
|
|
204
|
+
deserunt mollit anim id est laborum.
|
|
205
|
+
`;
|
|
206
|
+
|
|
207
|
+
const tabsConfig = {
|
|
208
|
+
tabs: [
|
|
209
|
+
{
|
|
210
|
+
label: "Credit Card",
|
|
211
|
+
active: true,
|
|
212
|
+
content: <Text>{LOREM}</Text>
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
label: "Check",
|
|
216
|
+
active: true,
|
|
217
|
+
content: MyCheckForm(
|
|
218
|
+
{ ...checkMapStateToProps(checkStore.getState()) },
|
|
219
|
+
{ ...checkMapDispatchToProps(checkStore.dispatch) }
|
|
220
|
+
)
|
|
221
|
+
},
|
|
222
|
+
{
|
|
223
|
+
label: "Cash",
|
|
224
|
+
active: true,
|
|
225
|
+
content: <ButtonTest></ButtonTest>
|
|
147
226
|
}
|
|
148
|
-
|
|
227
|
+
]
|
|
149
228
|
};
|
|
229
|
+
|
|
230
|
+
const HORIZONTAL = "horizontal";
|
|
231
|
+
|
|
232
|
+
export const tabs = () => (
|
|
233
|
+
<Tabs tabsConfig={tabsConfig} tabsDisplayMode={HORIZONTAL} />
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
const story = page({
|
|
237
|
+
title: "Components|Molecules/Tabs",
|
|
238
|
+
Component: Tabs
|
|
239
|
+
});
|
|
240
|
+
|
|
241
|
+
export default story;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import React, { useEffect } from "react";
|
|
2
|
+
import ToastNotification from "./ToastNotification";
|
|
3
|
+
import page from "../../../../.storybook/page";
|
|
4
|
+
import { useToastNotification } from "../../../hooks";
|
|
5
|
+
import { ToastVariants } from "../../../types/common";
|
|
6
|
+
import { text } from "@storybook/addon-knobs";
|
|
7
|
+
|
|
8
|
+
const groupId = "props";
|
|
9
|
+
|
|
10
|
+
export const toastNotificationSuccess = () => {
|
|
11
|
+
const {
|
|
12
|
+
isToastOpen,
|
|
13
|
+
toastVariant,
|
|
14
|
+
toastMessage,
|
|
15
|
+
showToast,
|
|
16
|
+
hideToast
|
|
17
|
+
} = useToastNotification();
|
|
18
|
+
|
|
19
|
+
useEffect(() => {
|
|
20
|
+
showToast({
|
|
21
|
+
message: "Success!",
|
|
22
|
+
variant: ToastVariants.SUCCESS
|
|
23
|
+
});
|
|
24
|
+
}, []);
|
|
25
|
+
|
|
26
|
+
return (
|
|
27
|
+
<ToastNotification
|
|
28
|
+
variant={toastVariant}
|
|
29
|
+
message={toastMessage}
|
|
30
|
+
toastOpen={isToastOpen}
|
|
31
|
+
closeToastNotification={() => hideToast()}
|
|
32
|
+
role={text("role", "alert", groupId)}
|
|
33
|
+
minWidth={text("minWidth", null, groupId)}
|
|
34
|
+
maxWidth={text("maxWidth", null, groupId)}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
toastNotificationSuccess.storyName = "Success Toast";
|
|
40
|
+
|
|
41
|
+
export const toastNotificationError = () => {
|
|
42
|
+
const {
|
|
43
|
+
isToastOpen,
|
|
44
|
+
toastVariant,
|
|
45
|
+
toastMessage,
|
|
46
|
+
showToast,
|
|
47
|
+
hideToast
|
|
48
|
+
} = useToastNotification();
|
|
49
|
+
|
|
50
|
+
useEffect(() => {
|
|
51
|
+
showToast({
|
|
52
|
+
message: "An error occurred",
|
|
53
|
+
variant: ToastVariants.ERROR
|
|
54
|
+
});
|
|
55
|
+
}, []);
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<ToastNotification
|
|
59
|
+
variant={toastVariant}
|
|
60
|
+
message={toastMessage}
|
|
61
|
+
toastOpen={isToastOpen}
|
|
62
|
+
closeToastNotification={() => hideToast()}
|
|
63
|
+
role={text("role", "alert", groupId)}
|
|
64
|
+
minWidth={text("minWidth", null, groupId)}
|
|
65
|
+
maxWidth={text("maxWidth", null, groupId)}
|
|
66
|
+
/>
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
toastNotificationError.storyName = "Error Toast";
|
|
70
|
+
|
|
71
|
+
export const toastNotificationNoAutoHide = () => {
|
|
72
|
+
const {
|
|
73
|
+
isToastOpen,
|
|
74
|
+
toastMessage,
|
|
75
|
+
showToast,
|
|
76
|
+
hideToast
|
|
77
|
+
} = useToastNotification({ timeout: 0 });
|
|
78
|
+
|
|
79
|
+
useEffect(() => {
|
|
80
|
+
showToast({
|
|
81
|
+
message: "Success!",
|
|
82
|
+
variant: ToastVariants.SUCCESS
|
|
83
|
+
});
|
|
84
|
+
}, []);
|
|
85
|
+
|
|
86
|
+
return (
|
|
87
|
+
<ToastNotification
|
|
88
|
+
message={toastMessage}
|
|
89
|
+
toastOpen={isToastOpen}
|
|
90
|
+
closeToastNotification={() => hideToast()}
|
|
91
|
+
role={text("role", "alert", groupId)}
|
|
92
|
+
minWidth={text("minWidth", null, groupId)}
|
|
93
|
+
maxWidth={text("maxWidth", null, groupId)}
|
|
94
|
+
/>
|
|
95
|
+
);
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
toastNotificationNoAutoHide.storyName = "No auto-hide";
|
|
99
|
+
|
|
100
|
+
const story = page({
|
|
101
|
+
title: "Components|Molecules/ToastNotification",
|
|
102
|
+
Component: ToastNotification
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
export default story;
|
|
@@ -18,12 +18,11 @@ const useOutsideClickHook = handler => {
|
|
|
18
18
|
if (ref.current && !ref.current.contains(e.target)) {
|
|
19
19
|
handler();
|
|
20
20
|
}
|
|
21
|
+
};
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
document.removeEventListener("click", handleOutsideClick, true);
|
|
26
|
-
};
|
|
23
|
+
document.addEventListener("click", handleOutsideClick, true);
|
|
24
|
+
return () => {
|
|
25
|
+
document.removeEventListener("click", handleOutsideClick, true);
|
|
27
26
|
};
|
|
28
27
|
}, [ref]);
|
|
29
28
|
|
package/src/util/index.js
CHANGED
|
@@ -4,7 +4,6 @@ import * as theme from "./themeUtils";
|
|
|
4
4
|
import useFocusInvalidInput from "./focusFirstInvalidInputHook";
|
|
5
5
|
import useOutsideClick from "../hooks/use-outside-click";
|
|
6
6
|
import useToastNotification from "../hooks/use-toast-notification";
|
|
7
|
-
import useLogoutTimers from "./idleTimerUtils";
|
|
8
7
|
|
|
9
8
|
export {
|
|
10
9
|
formats,
|
|
@@ -12,6 +11,5 @@ export {
|
|
|
12
11
|
theme,
|
|
13
12
|
useFocusInvalidInput,
|
|
14
13
|
useOutsideClick,
|
|
15
|
-
useToastNotification
|
|
16
|
-
useLogoutTimers
|
|
14
|
+
useToastNotification
|
|
17
15
|
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as AlertStories from './Alert.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={AlertStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The Alert component is a fully accesible element to provide notifications to a user. Its features include:
|
|
10
|
-
|
|
11
|
-
- Multiple types: info, warn, error, success
|
|
12
|
-
- Ability to allow user to dismiss the alert
|
|
13
|
-
- Default support of heading text, body text, and customizable children elements
|
|
14
|
-
- Highly customizable content via textOverride
|
|
15
|
-
- Accessibility props for aria-role, aria-atomic, and aria-live
|
|
16
|
-
|
|
17
|
-
<div style={{ marginBottom: "2em"}}>
|
|
18
|
-
<Story />
|
|
19
|
-
</div>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as BadgeStories from './Badge.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={BadgeStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The Badge component is a small component used to provide information in the form of an icon and text string to users at a glance. Badges can be used in tables, as tags, in UI controls, or anywhere display of bite-sized information is needed.
|
|
10
|
-
|
|
11
|
-
All themes use the same badge variants (and colors) as displayed here, but custom badges can be added to theme patterns in FCS if desired.
|
|
12
|
-
|
|
13
|
-
Badges have these properties:
|
|
14
|
-
|
|
15
|
-
- label (required)
|
|
16
|
-
- Icon (optional)
|
|
17
|
-
- variant (optional, default is "success")
|
|
18
|
-
- iconOnLeft (optional, default is "true")
|
|
19
|
-
|
|
20
|
-
Badge theme variants control *only* the background color of the badge and the color of its text. Icon color is either passed in as a prop to the Icon component (ideal), or controlled by the Icon themeing.
|
|
21
|
-
|
|
22
|
-
Note: if using the second approach, it is possible for the color of badge text and icon to diverge, possibly in undersible ways, unless special variants are added to the Icon themes in the FCS theme patterns. See the "Payment History" badge - try changing the theme in storybook - for an example of this.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<div style={{ marginBottom: "2em"}}>
|
|
26
|
-
<Story />
|
|
27
|
-
</div>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as BreadcrumbStories from './Breadcrumb.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={BreadcrumbStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
Breadcrumb is a themeable component that generates a horizontal navigation with links separated by chevron icons.
|
|
10
|
-
|
|
11
|
-
The component only takes on prop: `breadcrumbsList`, which must be an array of objects with the following properties:
|
|
12
|
-
|
|
13
|
-
- `linkText`: string for the link's text
|
|
14
|
-
- `linkDestination`: string or react-router path for the link's URL
|
|
15
|
-
- `isActive`: boolean, changes the style and cursor of the link to represent the current page
|
|
16
|
-
|
|
17
|
-
Breadcrumb uses the InternalLink component for each crumb, which uses the Link component from react-router-dom.
|
|
18
|
-
|
|
19
|
-
<Story />
|
|
20
|
-
|
|
21
|
-
<Controls />
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as ButtonWithLinkStories from './ButtonWithLink.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={ButtonWithLinkStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
`ButtonWithLink` wraps a [ButtonWithAction](?path=/docs/atoms-buttonwithaction--docs) component with either a `ExternalLink` or `InternalLink` component, unless the `disabled` prop is `true`, then it returns just the disabled `ButtonWithAction`.
|
|
10
|
-
|
|
11
|
-
Any additional props not specified in the component params will be passed down to the underlying `ButtonWithAction` component, including the `text` prop, which will be used as the text for the button.
|
|
12
|
-
|
|
13
|
-
The underlying `ButtonWithAction` component is themeable, and the variant can be changed by passing a valid `variant` value to `ButtonWithLink`.
|
|
14
|
-
|
|
15
|
-
`extraStyles` will be passed down to the `ButtonWithAction`, while `linkExtraStyles` are passed to the `ExternalLink` or `InternalLink` component.
|
|
16
|
-
|
|
17
|
-
`fileLink` forces the use of the `ExternalLink` component, even if the value of `url` is not an full external link with a valid URL prefix like `http://`.
|
|
18
|
-
|
|
19
|
-
<Story />
|
|
20
|
-
|
|
21
|
-
<Controls />
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
-
|
|
3
|
-
import * as CardStories from './Card.stories.js';
|
|
4
|
-
|
|
5
|
-
<Meta of={CardStories} />
|
|
6
|
-
|
|
7
|
-
<Title />
|
|
8
|
-
|
|
9
|
-
The Card component is a generic wrapper to create "cards" of information. A Card can contain a header, title, body text, images, and custom controls. Providing strings for header/title/body text as props results in default styling, but the component is very flexible and can be customized to display virtually any information.
|
|
10
|
-
|
|
11
|
-
Cards can take these properties to display content:
|
|
12
|
-
|
|
13
|
-
- headerText (optional)
|
|
14
|
-
- titleText (optional)
|
|
15
|
-
- text (optional)
|
|
16
|
-
- imgSrc (optional)
|
|
17
|
-
- Image (optional)
|
|
18
|
-
- children
|
|
19
|
-
|
|
20
|
-
In addition to the content props, Cards also offer certain props for controlling the style and display of provided information:
|
|
21
|
-
|
|
22
|
-
- headerAs (optional, default "h2")
|
|
23
|
-
- headerVariant (optional, default "small")
|
|
24
|
-
- imgHeight (optional, default "150px")
|
|
25
|
-
- imgObjectFit (optional, default "none")
|
|
26
|
-
- imgAltText (required for proper accessibility)
|
|
27
|
-
- titleVariant (optional, default "small")
|
|
28
|
-
- padding (optioonal, default "24px")
|
|
29
|
-
- width (optional min-width, default "276px")
|
|
30
|
-
|
|
31
|
-
By default, the width prop is the Card's _minimum_ width. The card will scale to match its width to the width of its parent container. If you wish to cap the Card's with, use the extraStyles prop like so:
|
|
32
|
-
|
|
33
|
-
```
|
|
34
|
-
<Card extraStyles={`& { max-width: 450px };`} />
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
When using a Card to display an image there are two options. Either provide a URL string using the imgSrc prop, or provide a React Component using the Image prop. These are mutually exclusive options -- an image provided using the Image prop will only be displayed if imgSrc is undefined.
|
|
38
|
-
|
|
39
|
-
<div style={{ marginBottom: "2em"}}>
|
|
40
|
-
<Story />
|
|
41
|
-
</div>
|