@thecb/components 10.12.1 → 10.12.3-beta.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/README.md +4 -0
- package/dist/index.cjs.js +1413 -2314
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.esm.js +1413 -2315
- package/dist/index.esm.js.map +1 -1
- package/package.json +25 -13
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/alert/Alert.mdx +19 -0
- package/src/components/atoms/alert/Alert.stories.js +148 -26
- package/src/components/atoms/badge/Badge.js +2 -2
- package/src/components/atoms/badge/Badge.mdx +27 -0
- package/src/components/atoms/badge/Badge.stories.js +143 -29
- package/src/components/atoms/breadcrumb/Breadcrumb.mdx +21 -0
- package/src/components/atoms/breadcrumb/Breadcrumb.stories.js +38 -29
- package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +108 -55
- package/src/components/atoms/button-with-link/ButtonWithLink.mdx +21 -0
- package/src/components/atoms/button-with-link/ButtonWithLink.stories.js +160 -31
- package/src/components/atoms/card/Card.js +13 -1
- package/src/components/atoms/card/Card.mdx +41 -0
- package/src/components/atoms/card/Card.stories.js +360 -0
- package/src/components/atoms/card/Card.theme.js +2 -0
- package/src/components/atoms/card/index.d.ts +1 -0
- package/src/components/atoms/checkbox/Checkbox.mdx +15 -0
- package/src/components/atoms/checkbox/Checkbox.oldstories.js +30 -0
- package/src/components/atoms/checkbox/Checkbox.stories.js +148 -29
- package/src/components/atoms/country-dropdown/CountryDropdown.mdx +36 -0
- package/src/components/atoms/country-dropdown/CountryDropdown.stories.js +61 -27
- package/src/components/atoms/detail/Detail.js +0 -26
- package/src/components/atoms/detail/Detail.mdx +32 -0
- package/src/components/atoms/detail/Detail.stories.js +156 -0
- package/src/components/atoms/display-box/DisplayBox.mdx +11 -0
- package/src/components/atoms/display-box/DisplayBox.stories.js +65 -21
- package/src/components/atoms/display-card/DisplayCard.mdx +13 -0
- package/src/components/atoms/display-card/DisplayCard.stories.js +163 -22
- package/src/components/atoms/dropdown/Dropdown.mdx +65 -0
- package/src/components/atoms/dropdown/Dropdown.stories.js +91 -10
- package/src/components/atoms/form-layouts/FormInput.mdx +38 -0
- package/src/components/atoms/form-layouts/FormInput.stories.js +212 -26
- package/src/components/atoms/form-select/FormSelect.mdx +42 -0
- package/src/components/atoms/form-select/FormSelect.stories.js +55 -29
- package/src/components/atoms/formatted-address/FormattedAddress.mdx +13 -0
- package/src/components/atoms/formatted-address/FormattedAddress.stories.js +133 -27
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.mdx +17 -0
- package/src/components/atoms/formatted-bank-account/FormattedBankAccount.stories.js +57 -0
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.mdx +40 -0
- package/src/components/atoms/formatted-credit-card/FormattedCreditCard.stories.js +74 -0
- package/src/components/atoms/icons/Icons.mdx +40 -0
- package/src/components/atoms/icons/Icons.stories.js +325 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.mdx +23 -0
- package/src/components/atoms/labeled-amount/LabeledAmount.stories.js +110 -34
- package/src/components/atoms/line-item/LineItem.mdx +28 -0
- package/src/components/atoms/line-item/LineItem.stories.js +89 -22
- package/src/components/atoms/link/Link.mdx +19 -0
- package/src/components/atoms/link/Link.stories.js +155 -49
- package/src/components/atoms/loading/Loading.mdx +13 -0
- package/src/components/atoms/loading/Loading.stories.js +22 -0
- package/src/components/atoms/loading-line/LoadingLine.js +14 -10
- package/src/components/atoms/loading-line/LoadingLine.mdx +15 -0
- package/src/components/atoms/loading-line/LoadingLine.stories.js +132 -28
- package/src/components/atoms/nav-footer/NavFooter.mdx +15 -0
- package/src/components/atoms/nav-footer/NavFooter.stories.js +235 -22
- package/src/components/atoms/nav-header/NavHeader.mdx +13 -0
- package/src/components/atoms/nav-header/NavHeader.stories.js +122 -21
- package/src/components/atoms/nav-tabs/NavTabs.mdx +30 -0
- package/src/components/atoms/nav-tabs/NavTabs.stories.js +49 -0
- package/src/components/atoms/password-requirements/PasswordRequirements.mdx +39 -0
- package/src/components/atoms/password-requirements/PasswordRequirements.stories.js +108 -44
- package/src/components/atoms/placeholder/Placeholder.mdx +19 -0
- package/src/components/atoms/placeholder/Placeholder.stories.js +164 -36
- package/src/components/atoms/searchable-select/SearchableSelect.mdx +44 -0
- package/src/components/atoms/searchable-select/SearchableSelect.stories.js +103 -28
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.mdx +36 -0
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.stories.js +65 -40
- package/src/components/atoms/table/Table.mdx +71 -0
- package/src/components/atoms/table/Table.oldstories.js +84 -0
- package/src/components/atoms/table/Table.stories.js +59 -75
- package/src/components/atoms/table/TableRow.js +1 -0
- package/src/components/atoms/title/Title.js +0 -23
- package/src/components/atoms/title/Title.mdx +26 -0
- package/src/components/atoms/title/Title.stories.js +144 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.mdx +17 -0
- package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +103 -20
- package/src/components/atoms/toggle-switch/ToggleSwitch.theme.js +8 -5
- package/src/components/atoms/typeahead-input/TypeaheadInput.mdx +13 -0
- package/src/components/atoms/typeahead-input/TypeaheadInput.stories.js +63 -0
- package/src/components/molecules/address-form/AddressForm.mdx +18 -0
- package/src/components/molecules/address-form/AddressForm.stories.js +223 -20
- package/src/components/molecules/banner/Banner.mdx +23 -0
- package/src/components/molecules/banner/Banner.stories.js +122 -26
- package/src/components/molecules/change-password-form/ChangePasswordForm.mdx +15 -0
- package/src/components/molecules/change-password-form/ChangePasswordForm.stories.js +203 -19
- package/src/components/molecules/collapsible-section/CollapsibleSection.mdx +15 -0
- package/src/components/molecules/collapsible-section/CollapsibleSection.stories.js +210 -61
- package/src/components/molecules/edit-name-form/EditNameForm.mdx +13 -0
- package/src/components/molecules/edit-name-form/EditNameForm.stories.js +117 -0
- package/src/components/molecules/idle-modal/IdleModal.js +101 -0
- package/src/components/molecules/idle-modal/IdleModal.mdx +17 -0
- package/src/components/molecules/idle-modal/IdleModal.stories.js +180 -0
- package/src/components/molecules/idle-modal/index.d.ts +16 -0
- package/src/components/molecules/idle-modal/index.js +3 -0
- package/src/components/molecules/index.js +1 -0
- package/src/components/molecules/link-card/LinkCard.mdx +17 -0
- package/src/components/molecules/link-card/LinkCard.stories.js +287 -72
- package/src/components/molecules/login-form/LoginForm.mdx +16 -0
- package/src/components/molecules/login-form/LoginForm.stories.js +117 -21
- package/src/components/molecules/modal/Modal.mdx +17 -0
- package/src/components/molecules/modal/Modal.stories.js +342 -128
- package/src/components/molecules/module/Module.mdx +17 -0
- package/src/components/molecules/module/Module.stories.js +267 -25
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.js +295 -61
- package/src/components/molecules/multiple-select-filter/{MultipleSelectFilter.stories.js → MultipleSelectFilter.oldstories.js} +1 -1
- package/src/components/molecules/multiple-select-filter/MultipleSelectFilter.styled.js +4 -4
- package/src/components/molecules/obligation/Obligation.mdx +23 -0
- package/src/components/molecules/obligation/Obligation.stories.js +460 -0
- package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +1 -1
- package/src/components/molecules/pagination/Pagination.mdx +15 -0
- package/src/components/molecules/pagination/Pagination.stories.js +177 -28
- package/src/components/molecules/popover/Popover.mdx +15 -0
- package/src/components/molecules/popover/Popover.stories.js +220 -0
- package/src/components/molecules/tabs/Tabs.mdx +17 -0
- package/src/components/molecules/tabs/Tabs.stories.js +135 -227
- package/src/components/molecules/toast-notification/Toast.mdx +15 -0
- package/src/components/molecules/toast-notification/Toast.stories.js +183 -0
- package/src/hooks/use-outside-click/index.js +5 -4
- package/src/stories/Button.stories.ts +53 -0
- package/src/stories/Button.tsx +48 -0
- package/src/stories/Configure.mdx +364 -0
- package/src/stories/Header.stories.ts +33 -0
- package/src/stories/Header.tsx +56 -0
- package/src/stories/Page.stories.ts +32 -0
- package/src/stories/Page.tsx +73 -0
- package/src/stories/assets/accessibility.png +0 -0
- package/src/stories/assets/accessibility.svg +5 -0
- 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 +15 -0
- package/src/stories/assets/docs.png +0 -0
- package/src/stories/assets/figma-plugin.png +0 -0
- package/src/stories/assets/github.svg +3 -0
- 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 +12 -0
- package/src/stories/assets/youtube.svg +4 -0
- package/src/stories/button.css +30 -0
- package/src/stories/header.css +32 -0
- package/src/stories/page.css +69 -0
- package/src/util/idleTimerUtils.js +36 -0
- package/src/util/index.js +3 -1
- package/src/components/atoms/icons/icons.stories.js +0 -116
- package/src/components/molecules/edit-name-form/EdidNameForm.stories.js +0 -24
- package/src/components/molecules/multiple-select-filter/__private__/ActionLinkButton.js +0 -24
- package/src/components/molecules/multiple-select-filter/__private__/FilterButton.js +0 -85
- package/src/components/molecules/multiple-select-filter/__private__/FilterDropdown.js +0 -23
- package/src/components/molecules/multiple-select-filter/__private__/FilterableList.js +0 -144
- package/src/components/molecules/multiple-select-filter/__private__/FilterableListItem.js +0 -67
- package/src/components/molecules/multiple-select-filter/__private__/SearchBox.js +0 -38
- package/src/components/molecules/multiple-select-filter/__private__/useKeyboardNavigation.js +0 -84
- package/src/components/molecules/multiple-select-filter/__private__/util.js +0 -31
- package/src/components/molecules/toast-notification/ToastNotification.stories.js +0 -105
- /package/src/components/atoms/add-obligation/{AddObligation.stories.js → AddObligation.oldstories.js} +0 -0
- /package/src/components/atoms/amount-callout/{AmountCallout.stories.js → AmountCallout.oldstories.js} +0 -0
- /package/src/components/atoms/checkbox-list/{CheckboxList.stories.js → CheckboxList.oldstories.js} +0 -0
- /package/src/components/atoms/form-layouts/{FormLayouts.stories.js → FormLayouts.oldstories.js} +0 -0
- /package/src/components/atoms/hamburger-button/{HamburgerButton.stories.js → HamburgerButton.oldstories.js} +0 -0
- /package/src/components/atoms/heading/{Heading.stories.js → Heading.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/box-example/{BoxExample.stories.js → BoxExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/center-example/{CenterExample.stories.js → CenterExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cluster-example/{ClusterExample.stories.js → ClusterExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/cover-example/{CoverExample.stories.js → CoverExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/frame-example/{FrameExample.stories.js → FrameExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/grid-example/{GridExample.stories.js → GridExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/imposter-example/{ImposterExample.stories.js → ImposterExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/motion-example/{MotionExample.stories.js → MotionExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/reel-example/{ReelExample.stories.js → ReelExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/sidebar-example/{SidebarExample.stories.js → SidebarExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/stack-example/{StackExample.stories.js → StackExample.oldstories.js} +0 -0
- /package/src/components/atoms/layouts/examples/switcher-example/{SwitcherExample.stories.js → SwitcherExample.oldstories.js} +0 -0
- /package/src/components/atoms/paragraph/{Paragraph.stories.js → Paragraph.oldstories.js} +0 -0
- /package/src/components/atoms/processing-fee/{ProcessingFee.stories.js → ProcessingFee.oldstories.js} +0 -0
- /package/src/components/atoms/search/{Search.stories.js → Search.oldstories.js} +0 -0
- /package/src/components/atoms/solid-divider/{SolidDivider.stories.js → SolidDivider.oldstories.js} +0 -0
- /package/src/components/atoms/sortable-table-heading/{SortableTableHeading.stories.js → SortableTableHeading.oldstories.js} +0 -0
- /package/src/components/atoms/spinner/{Spinner.stories.js → Spinner.oldstories.js} +0 -0
- /package/src/components/atoms/tab/{Tab.stories.js → Tab.oldstories.js} +0 -0
- /package/src/components/atoms/text/{Text.stories.js → Text.oldstories.js} +0 -0
- /package/src/components/atoms/typeahead-input/{TypeaheadIinput.stories.js → TypeaheadIinput.oldstories.js} +0 -0
- /package/src/components/atoms/wallet-name/{WalletName.stories.js → WalletName.oldstories.js} +0 -0
- /package/src/components/molecules/account-and-routing-modal/{AccountAndRoutingModal.stories.js → AccountAndRoutingModal.oldstories.js} +0 -0
- /package/src/components/molecules/editable-list/{EditableList.stories.js → EditableList.oldstories.js} +0 -0
- /package/src/components/molecules/email-form/{EmailForm.stories.js → EmailForm.oldstories.js} +0 -0
- /package/src/components/molecules/forgot-password-form/{ForgotPasswordForm.stories.js → ForgotPasswordForm.oldstories.js} +0 -0
- /package/src/components/molecules/highlight-tab-row/{HighlightTabRow.stories.js → HighlightTabRow.oldstories.js} +0 -0
- /package/src/components/molecules/obligation/modules/{AmountModule.stories.js → AmountModule.oldstories.js} +0 -0
- /package/src/components/molecules/payment-button-bar/{PaymentButtonBar.stories.js → PaymentButtonBar.oldstories.js} +0 -0
- /package/src/components/molecules/payment-details/{PaymentDetails.stories.js → PaymentDetails.oldstories.js} +0 -0
- /package/src/components/molecules/payment-form-ach/{PaymentFormACH.stories.js → PaymentFormACH.oldstories.js} +0 -0
- /package/src/components/molecules/payment-form-card/{PaymentFormCard.stories.js → PaymentFormCard.oldstories.js} +0 -0
- /package/src/components/molecules/periscope-dashboard-iframe/{PeriscopeDashBoardIframe.stories.js → PeriscopeDashBoardIframe.oldstories.js} +0 -0
- /package/src/components/molecules/phone-form/{PhoneForm.stories.js → PhoneForm.oldstories.js} +0 -0
- /package/src/components/molecules/popup-menu/{PopupMenu.stories.js → PopupMenu.oldstories.js} +0 -0
- /package/src/components/molecules/radio-group/{RadioGroup.stories.js → RadioGroup.oldstories.js} +0 -0
- /package/src/components/molecules/radio-section/{RadioSection.stories.js → RadioSection.oldstories.js} +0 -0
- /package/src/components/molecules/registration-form/{RegistrationForm.stories.js → RegistrationForm.oldstories.js} +0 -0
- /package/src/components/molecules/reset-confirmation-form/{ResetConfirmationForm.stories.js → ResetConfirmationForm.oldstories.js} +0 -0
- /package/src/components/molecules/reset-password-form/{ResetPasswordForm.stories.js → ResetPasswordForm.oldstories.js} +0 -0
- /package/src/components/molecules/reset-password-success/{ResetPasswordSuccess.stories.js → ResetPasswordSuccess.oldstories.js} +0 -0
- /package/src/components/molecules/tab-sidebar/{TabSidebar.stories.js → TabSidebar.oldstories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions/{TermsAndConditions.stories.js → TermsAndConditions.oldstories.js} +0 -0
- /package/src/components/molecules/terms-and-conditions-modal/{TermsAndConditionsModal.stories.js → TermsAndConditionsModal.oldstories.js} +0 -0
- /package/src/components/molecules/workflow-tile/{WorkflowTile.stories.js → WorkflowTile.oldstories.js} +0 -0
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import Obligation from "./Obligation";
|
|
3
|
+
import { fn } from "@storybook/test";
|
|
4
|
+
import { Box } from "../../atoms/layouts";
|
|
5
|
+
|
|
6
|
+
const meta = {
|
|
7
|
+
title: "Molecules/Obligation",
|
|
8
|
+
component: Obligation,
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: "centered"
|
|
11
|
+
},
|
|
12
|
+
tags: ["!autodocs"],
|
|
13
|
+
args: {
|
|
14
|
+
config: undefined,
|
|
15
|
+
obligations: undefined,
|
|
16
|
+
actions: undefined,
|
|
17
|
+
autoPayEnabled: false,
|
|
18
|
+
autoPayAvailable: false,
|
|
19
|
+
handleAutopayAction: fn(),
|
|
20
|
+
deactivatePaymentSchedule: fn(),
|
|
21
|
+
autoPaySchedule: undefined,
|
|
22
|
+
paymentPlanSchedule: undefined,
|
|
23
|
+
navigateToSettings: fn(),
|
|
24
|
+
isPaymentPlan: false,
|
|
25
|
+
nextAutopayDate: undefined,
|
|
26
|
+
obligationAssocID: undefined,
|
|
27
|
+
dueDate: undefined,
|
|
28
|
+
agencyName: undefined,
|
|
29
|
+
inactive: false,
|
|
30
|
+
inactiveLookupTitle: "",
|
|
31
|
+
inactiveLookupInput: "Account",
|
|
32
|
+
inactiveLookupValue: "",
|
|
33
|
+
isInCustomerManagement: false
|
|
34
|
+
},
|
|
35
|
+
argTypes: {
|
|
36
|
+
config: {
|
|
37
|
+
description:
|
|
38
|
+
"Config object that helps set icons and description/subdescription for obligation. Retrieved from FCS.",
|
|
39
|
+
table: {
|
|
40
|
+
type: { summary: "object" },
|
|
41
|
+
defaultValue: { summary: undefined }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
obligations: {
|
|
45
|
+
description: "Array of obligation objects",
|
|
46
|
+
table: {
|
|
47
|
+
type: { summary: "array" },
|
|
48
|
+
defaultValue: { summary: undefined }
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
actions: {
|
|
52
|
+
description:
|
|
53
|
+
"Collection of profile-specific Redux actions that are used by the PaymentDetails submodule",
|
|
54
|
+
table: {
|
|
55
|
+
type: { summary: "object" },
|
|
56
|
+
defaultValue: { summary: undefined }
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
autoPayEnabled: {
|
|
60
|
+
description: "Whether the obligation is currently set up for autopay",
|
|
61
|
+
table: {
|
|
62
|
+
type: { summary: "boolean" },
|
|
63
|
+
defaultValue: { summary: false }
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
autoPayAvailable: {
|
|
67
|
+
description: "Whether the obligation supports autopay",
|
|
68
|
+
table: {
|
|
69
|
+
type: { summary: "boolean" },
|
|
70
|
+
defaultValue: { summary: false }
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
handleAutopayAction: {
|
|
74
|
+
description: "Function run when user toggles autoapy button",
|
|
75
|
+
table: {
|
|
76
|
+
type: { summary: "function" },
|
|
77
|
+
defaultValue: { summary: undefined }
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
deactivatePaymentSchedule: {
|
|
81
|
+
description: "Function run when user disabled autopay",
|
|
82
|
+
table: {
|
|
83
|
+
type: { summary: "function" },
|
|
84
|
+
defaultValue: { summary: undefined }
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
autoPaySchedule: {
|
|
88
|
+
description: "Schedule object for autopay",
|
|
89
|
+
table: {
|
|
90
|
+
type: { summary: "object" },
|
|
91
|
+
defaultValue: { summary: undefined }
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
paymentPlanSchedule: {
|
|
95
|
+
description: "Schedule object for payment plan. Currently unused.",
|
|
96
|
+
table: {
|
|
97
|
+
type: { summary: "object" },
|
|
98
|
+
defaultValue: { summary: undefined }
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
navigateToSettings: {
|
|
102
|
+
description:
|
|
103
|
+
"Function that navigates a user to the settings page on the profile",
|
|
104
|
+
table: {
|
|
105
|
+
type: { summary: "function" },
|
|
106
|
+
defaultValue: { summary: undefined }
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
isPaymentPlan: {
|
|
110
|
+
description:
|
|
111
|
+
"Whether the obligation is a payment plan type. Currently unused.",
|
|
112
|
+
table: {
|
|
113
|
+
type: { summary: "boolean" },
|
|
114
|
+
defaultValue: { summary: false }
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
nextAutopayDate: {
|
|
118
|
+
description: "The date the next autopay will run",
|
|
119
|
+
table: {
|
|
120
|
+
type: { summary: "string" },
|
|
121
|
+
defaultValue: { summary: undefined }
|
|
122
|
+
}
|
|
123
|
+
},
|
|
124
|
+
obligationAssocID: {
|
|
125
|
+
description:
|
|
126
|
+
"The ID of the payment schedule associated with this obligation",
|
|
127
|
+
table: {
|
|
128
|
+
type: { summary: "string" },
|
|
129
|
+
defaultValue: { summary: undefined }
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
agencyName: {
|
|
133
|
+
description:
|
|
134
|
+
"The name of the agency for this obligation. Used to populate inactive obligation descriptions.",
|
|
135
|
+
table: {
|
|
136
|
+
type: { summary: "string" },
|
|
137
|
+
defaultValue: { summary: undefined }
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
inactive: {
|
|
141
|
+
description: "Whether the obligation is in an inactive state.",
|
|
142
|
+
table: {
|
|
143
|
+
type: { summary: "boolean" },
|
|
144
|
+
defaultValue: { summary: false }
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
inactiveLookupTitle: {
|
|
148
|
+
description: "String used in the description of an inactive obligation",
|
|
149
|
+
table: {
|
|
150
|
+
type: { summary: "string" },
|
|
151
|
+
defaultValue: { summary: "" }
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
inactiveLookupInput: {
|
|
155
|
+
description: "Type of obligation, used for inactive obligations",
|
|
156
|
+
table: {
|
|
157
|
+
type: { summary: "string" },
|
|
158
|
+
defaultValue: { summary: "Account" }
|
|
159
|
+
}
|
|
160
|
+
},
|
|
161
|
+
inactiveLookupValue: {
|
|
162
|
+
description:
|
|
163
|
+
"Account number or other information returned from lookup for inactive obligations",
|
|
164
|
+
table: {
|
|
165
|
+
type: { summary: "string" },
|
|
166
|
+
defaultValue: { summary: undefined }
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
isInCustomerManagement: {
|
|
170
|
+
description:
|
|
171
|
+
"Whether the user is a customer management user impersonating a profile. If true, certain controls are disabled.",
|
|
172
|
+
table: {
|
|
173
|
+
type: { summary: "boolean" },
|
|
174
|
+
defaultValue: { summary: false }
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
|
|
180
|
+
export default meta;
|
|
181
|
+
|
|
182
|
+
const obligationConfig = {
|
|
183
|
+
amountValue: "amountDue",
|
|
184
|
+
collection: true,
|
|
185
|
+
description: "Cityville Water Management",
|
|
186
|
+
details: {
|
|
187
|
+
collectionDetails: {
|
|
188
|
+
City: "city",
|
|
189
|
+
State: "state",
|
|
190
|
+
"Street Address": "street_address_line_1",
|
|
191
|
+
"Zip Code": "zip_code"
|
|
192
|
+
},
|
|
193
|
+
collectionDetailsList: [
|
|
194
|
+
{
|
|
195
|
+
attribute: "name",
|
|
196
|
+
label: "Name"
|
|
197
|
+
},
|
|
198
|
+
{
|
|
199
|
+
attribute: "street_address_line_1",
|
|
200
|
+
label: "Street Address"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
attribute: "city",
|
|
204
|
+
label: "City"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
attribute: "state",
|
|
208
|
+
label: "State"
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
attribute: "zip_code",
|
|
212
|
+
label: "Zip Code"
|
|
213
|
+
}
|
|
214
|
+
],
|
|
215
|
+
description: "Cityville Water Management",
|
|
216
|
+
obligationDetails: {
|
|
217
|
+
Account: "account_number",
|
|
218
|
+
Owner: "account_owner",
|
|
219
|
+
Status: "status",
|
|
220
|
+
"Utility Type": "utility_type"
|
|
221
|
+
},
|
|
222
|
+
subDescription: ["Account", "%account_number%"]
|
|
223
|
+
},
|
|
224
|
+
displayName: "Office of Water Management",
|
|
225
|
+
hasPaperlessBilling: true,
|
|
226
|
+
icon: [
|
|
227
|
+
"ACCOUNTS_UTILITY_ELECTRIC",
|
|
228
|
+
"ACCOUNTS_UTILITY_GAS",
|
|
229
|
+
"ACCOUNTS_UTILITY_GARBAGE",
|
|
230
|
+
"ACCOUNTS_UTILITY_WATER"
|
|
231
|
+
],
|
|
232
|
+
iconDefault: "ACCOUNTS_UTILITY_WATER",
|
|
233
|
+
iconMap: {
|
|
234
|
+
Water: "ACCOUNTS_UTILITY_WATER"
|
|
235
|
+
},
|
|
236
|
+
iconValue: "utility_type",
|
|
237
|
+
obligationSlug: "cityville-water",
|
|
238
|
+
paperlessBilling: {
|
|
239
|
+
confirmationContent: "",
|
|
240
|
+
infoContent: ""
|
|
241
|
+
},
|
|
242
|
+
paymentAttributes: {
|
|
243
|
+
accountId: "account_number",
|
|
244
|
+
amount: "amountDue",
|
|
245
|
+
customAttributes: {
|
|
246
|
+
account_city: "account_city",
|
|
247
|
+
account_number: "account_number",
|
|
248
|
+
account_owner: "account_owner",
|
|
249
|
+
account_street_address: "account_street_address",
|
|
250
|
+
account_zip_code: "account_zip_code",
|
|
251
|
+
utility_type: "utility_type"
|
|
252
|
+
},
|
|
253
|
+
description: ["Account", "%account_number%"],
|
|
254
|
+
subDescription: ["%account_owner%"]
|
|
255
|
+
},
|
|
256
|
+
subDescription: ["Account", "%account_number%"],
|
|
257
|
+
type: "ACCOUNT"
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
export const ActiveObligation = {
|
|
261
|
+
args: {
|
|
262
|
+
config: obligationConfig,
|
|
263
|
+
obligations: [
|
|
264
|
+
{
|
|
265
|
+
allowedPaymentInstruments: ["CASH", "CREDIT_CARD", "BANK_ACCOUNT"],
|
|
266
|
+
amountDue: 5438,
|
|
267
|
+
customAttributes: {
|
|
268
|
+
account_number: "1006",
|
|
269
|
+
city: "Cityville",
|
|
270
|
+
client_slug: "Cityville",
|
|
271
|
+
customer_name: "Shadout Mapes",
|
|
272
|
+
due_date: "2024-09-01T12:00:00",
|
|
273
|
+
invoice_number: "101006.0",
|
|
274
|
+
line_item_description: "Shadout Mapes",
|
|
275
|
+
line_item_sub_description: "1006",
|
|
276
|
+
name: "Shadout Mapes",
|
|
277
|
+
service_type: "water",
|
|
278
|
+
state: "North Carolina",
|
|
279
|
+
street_address_line_1: "23145 O'Hara Wells",
|
|
280
|
+
sub_client_slug: "cityville-water",
|
|
281
|
+
total_due_amount: "5438.0",
|
|
282
|
+
utility_type: "water",
|
|
283
|
+
zip_code: "79221"
|
|
284
|
+
},
|
|
285
|
+
id: "1006",
|
|
286
|
+
kind: "FEE",
|
|
287
|
+
description: "Cityville Water Management",
|
|
288
|
+
subDescription: "Account: 1006",
|
|
289
|
+
amountValue: 5438,
|
|
290
|
+
details: {
|
|
291
|
+
description: "Cityville Water Management",
|
|
292
|
+
subDescription: "Account: 1006"
|
|
293
|
+
},
|
|
294
|
+
paymentAttributes: {
|
|
295
|
+
description: "Account: 1006",
|
|
296
|
+
subDescription: "",
|
|
297
|
+
amount: 5438
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
],
|
|
301
|
+
actions: {
|
|
302
|
+
createPaymentFromProfile: fn(),
|
|
303
|
+
setDetailedObligation: fn(),
|
|
304
|
+
navigateToDetailedObligation: fn(),
|
|
305
|
+
deleteObligationAssoc: fn()
|
|
306
|
+
},
|
|
307
|
+
autoPayEnabled: true,
|
|
308
|
+
autoPayAvailable: true,
|
|
309
|
+
handleAutopayAction: fn(),
|
|
310
|
+
navigateToSettings: fn(),
|
|
311
|
+
deactivatePaymentSchedule: fn(),
|
|
312
|
+
isMobile: false,
|
|
313
|
+
nextAutopayDate: "On",
|
|
314
|
+
obligationAssocID: "046d66b9-5cea-4ccf-895a-97f21f314b72",
|
|
315
|
+
dueDate: "2024-09-01",
|
|
316
|
+
agencyName: "Water",
|
|
317
|
+
isInCustomerManagement: false
|
|
318
|
+
},
|
|
319
|
+
render: args => (
|
|
320
|
+
<Box minWidth="800px">
|
|
321
|
+
<Obligation {...args} />
|
|
322
|
+
</Box>
|
|
323
|
+
)
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
export const InactiveObligation = {
|
|
327
|
+
args: {
|
|
328
|
+
config: { ...obligationConfig, icon: "ACCOUNTS_HEALTH" },
|
|
329
|
+
obligations: [
|
|
330
|
+
{
|
|
331
|
+
allowedPaymentInstruments: ["CASH", "CREDIT_CARD", "BANK_ACCOUNT"],
|
|
332
|
+
amountDue: 5438,
|
|
333
|
+
customAttributes: {
|
|
334
|
+
account_number: "1006",
|
|
335
|
+
city: "Cityville",
|
|
336
|
+
client_slug: "Cityville",
|
|
337
|
+
customer_name: "Shadout Mapes",
|
|
338
|
+
due_date: "2024-09-01T12:00:00",
|
|
339
|
+
invoice_number: "101006.0",
|
|
340
|
+
line_item_description: "Shadout Mapes",
|
|
341
|
+
line_item_sub_description: "1006",
|
|
342
|
+
name: "Shadout Mapes",
|
|
343
|
+
service_type: "water",
|
|
344
|
+
state: "North Carolina",
|
|
345
|
+
street_address_line_1: "23145 O'Hara Wells",
|
|
346
|
+
sub_client_slug: "cityville-water",
|
|
347
|
+
total_due_amount: "5438.0",
|
|
348
|
+
utility_type: "water",
|
|
349
|
+
zip_code: "79221"
|
|
350
|
+
},
|
|
351
|
+
id: "1006",
|
|
352
|
+
kind: "FEE",
|
|
353
|
+
description: "Cityville Water Management",
|
|
354
|
+
subDescription: "Account: 1006",
|
|
355
|
+
amountValue: 5438,
|
|
356
|
+
details: {
|
|
357
|
+
description: "Cityville Water Management",
|
|
358
|
+
subDescription: "Account: 1006"
|
|
359
|
+
},
|
|
360
|
+
paymentAttributes: {
|
|
361
|
+
description: "Account: 1006",
|
|
362
|
+
subDescription: "",
|
|
363
|
+
amount: 5438
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
],
|
|
367
|
+
actions: {
|
|
368
|
+
createPaymentFromProfile: fn(),
|
|
369
|
+
setDetailedObligation: fn(),
|
|
370
|
+
navigateToDetailedObligation: fn(),
|
|
371
|
+
deleteObligationAssoc: fn()
|
|
372
|
+
},
|
|
373
|
+
autoPayEnabled: false,
|
|
374
|
+
autoPayAvailable: true,
|
|
375
|
+
handleAutopayAction: fn(),
|
|
376
|
+
navigateToSettings: fn(),
|
|
377
|
+
deactivatePaymentSchedule: fn(),
|
|
378
|
+
isMobile: false,
|
|
379
|
+
nextAutopayDate: "",
|
|
380
|
+
obligationAssocID: "046d66b9-5cea-4ccf-895a-97f21f314b72",
|
|
381
|
+
dueDate: "2024-09-01",
|
|
382
|
+
agencyName: "Health Service System",
|
|
383
|
+
isInCustomerManagement: false,
|
|
384
|
+
inactive: true,
|
|
385
|
+
inactiveLookupInput: undefined,
|
|
386
|
+
inactiveLookupTitle: "Health Service System",
|
|
387
|
+
inactiveLookupValue: "012856"
|
|
388
|
+
},
|
|
389
|
+
render: args => (
|
|
390
|
+
<Box minWidth="800px">
|
|
391
|
+
<Obligation {...args} />
|
|
392
|
+
</Box>
|
|
393
|
+
)
|
|
394
|
+
};
|
|
395
|
+
|
|
396
|
+
export const CustomerManagementObligation = {
|
|
397
|
+
args: {
|
|
398
|
+
config: obligationConfig,
|
|
399
|
+
obligations: [
|
|
400
|
+
{
|
|
401
|
+
allowedPaymentInstruments: ["CASH", "CREDIT_CARD", "BANK_ACCOUNT"],
|
|
402
|
+
amountDue: 5438,
|
|
403
|
+
customAttributes: {
|
|
404
|
+
account_number: "1006",
|
|
405
|
+
city: "Cityville",
|
|
406
|
+
client_slug: "Cityville",
|
|
407
|
+
customer_name: "Shadout Mapes",
|
|
408
|
+
due_date: "2024-09-01T12:00:00",
|
|
409
|
+
invoice_number: "101006.0",
|
|
410
|
+
line_item_description: "Shadout Mapes",
|
|
411
|
+
line_item_sub_description: "1006",
|
|
412
|
+
name: "Shadout Mapes",
|
|
413
|
+
service_type: "water",
|
|
414
|
+
state: "North Carolina",
|
|
415
|
+
street_address_line_1: "23145 O'Hara Wells",
|
|
416
|
+
sub_client_slug: "cityville-water",
|
|
417
|
+
total_due_amount: "5438.0",
|
|
418
|
+
utility_type: "water",
|
|
419
|
+
zip_code: "79221"
|
|
420
|
+
},
|
|
421
|
+
id: "1006",
|
|
422
|
+
kind: "FEE",
|
|
423
|
+
description: "Cityville Water Management",
|
|
424
|
+
subDescription: "Account: 1006",
|
|
425
|
+
amountValue: 5438,
|
|
426
|
+
details: {
|
|
427
|
+
description: "Cityville Water Management",
|
|
428
|
+
subDescription: "Account: 1006"
|
|
429
|
+
},
|
|
430
|
+
paymentAttributes: {
|
|
431
|
+
description: "Account: 1006",
|
|
432
|
+
subDescription: "",
|
|
433
|
+
amount: 5438
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
],
|
|
437
|
+
actions: {
|
|
438
|
+
createPaymentFromProfile: fn(),
|
|
439
|
+
setDetailedObligation: fn(),
|
|
440
|
+
navigateToDetailedObligation: fn(),
|
|
441
|
+
deleteObligationAssoc: fn()
|
|
442
|
+
},
|
|
443
|
+
autoPayEnabled: false,
|
|
444
|
+
autoPayAvailable: true,
|
|
445
|
+
handleAutopayAction: fn(),
|
|
446
|
+
navigateToSettings: fn(),
|
|
447
|
+
deactivatePaymentSchedule: fn(),
|
|
448
|
+
isMobile: false,
|
|
449
|
+
nextAutopayDate: "",
|
|
450
|
+
obligationAssocID: "046d66b9-5cea-4ccf-895a-97f21f314b72",
|
|
451
|
+
dueDate: "2024-09-01",
|
|
452
|
+
agencyName: "Water",
|
|
453
|
+
isInCustomerManagement: true
|
|
454
|
+
},
|
|
455
|
+
render: args => (
|
|
456
|
+
<Box minWidth="800px">
|
|
457
|
+
<Obligation {...args} />
|
|
458
|
+
</Box>
|
|
459
|
+
)
|
|
460
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Canvas, Meta, Title, Story, Controls } from '@storybook/blocks';
|
|
2
|
+
|
|
3
|
+
import * as PaginationStories from './Pagination.stories.js';
|
|
4
|
+
|
|
5
|
+
<Meta of={PaginationStories} />
|
|
6
|
+
|
|
7
|
+
<Title />
|
|
8
|
+
|
|
9
|
+
Pagination renders a control panel that can be used to interact with paginated tables of data. The component takes some props to customize the look of the controls, as well as callback functions to run when a user interacts with the previous, next, and numerical page buttons. The Pagination component should also be supplied with a number to indicate the current page the user is on as well as the total number of pages.
|
|
10
|
+
|
|
11
|
+
<Controls />
|
|
12
|
+
|
|
13
|
+
<div style={{ marginBottom: "2em"}}>
|
|
14
|
+
<Story />
|
|
15
|
+
</div>
|
|
@@ -1,32 +1,181 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import {
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { WHITE, GHOST_GREY } from "../../../constants/colors";
|
|
3
|
+
import { Box } from "../../atoms/layouts";
|
|
3
4
|
import Pagination from "./Pagination";
|
|
4
|
-
import
|
|
5
|
+
import { fn } from "@storybook/test";
|
|
6
|
+
import { FONT_WEIGHT_SEMIBOLD } from "../../../constants/style_constants";
|
|
5
7
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
8
|
+
const meta = {
|
|
9
|
+
title: "Molecules/Pagination",
|
|
10
|
+
component: Pagination,
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: "centered"
|
|
13
|
+
},
|
|
14
|
+
tags: ["!autodocs"],
|
|
15
|
+
args: {
|
|
16
|
+
activeBorderWidth: "3px",
|
|
17
|
+
ariaLabel: undefined,
|
|
18
|
+
arrowColor: undefined,
|
|
19
|
+
borderRadius: "3px",
|
|
20
|
+
buttonHeight: "44px",
|
|
21
|
+
buttonWidth: "44px",
|
|
22
|
+
childGap: "24px",
|
|
23
|
+
currentPage: undefined,
|
|
24
|
+
fontSize: "17px",
|
|
25
|
+
fontWeight: "900",
|
|
26
|
+
numberColor: undefined,
|
|
27
|
+
pageCount: undefined,
|
|
28
|
+
pageNext: fn(),
|
|
29
|
+
pagePrevious: fn(),
|
|
30
|
+
setCurrentPage: fn()
|
|
31
|
+
},
|
|
32
|
+
argTypes: {
|
|
33
|
+
activeBorderWidth: {
|
|
34
|
+
description: "The width of the border around the active page number",
|
|
35
|
+
table: {
|
|
36
|
+
type: { summary: "string" },
|
|
37
|
+
defaultValue: { summary: "3px" }
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
ariaLabel: {
|
|
41
|
+
description: "aria-label value for pagination container",
|
|
42
|
+
table: {
|
|
43
|
+
type: { summary: "string" },
|
|
44
|
+
defaultValue: { summary: undefined }
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
arrowColor: {
|
|
48
|
+
description:
|
|
49
|
+
"Override for arrow color, if undefined component uses themed values",
|
|
50
|
+
table: {
|
|
51
|
+
type: { summary: "string" },
|
|
52
|
+
defaultValue: { summary: undefined }
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
borderRadius: {
|
|
56
|
+
description: "Border radius of the border around pagination controls",
|
|
57
|
+
table: {
|
|
58
|
+
type: { summary: "string" },
|
|
59
|
+
defaultValue: { summary: "3px" }
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
buttonHeight: {
|
|
63
|
+
description: "Height of pagination buttons",
|
|
64
|
+
table: {
|
|
65
|
+
type: { summary: "string" },
|
|
66
|
+
defaultValue: { summary: "44px" }
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
buttonWidth: {
|
|
70
|
+
description: "Width of pagination buttons",
|
|
71
|
+
table: {
|
|
72
|
+
type: { summary: "string" },
|
|
73
|
+
defaultValue: { summary: "44px" }
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
childGap: {
|
|
77
|
+
description: "Gap between pagination buttons",
|
|
78
|
+
table: {
|
|
79
|
+
type: { summary: "string" },
|
|
80
|
+
defaultValue: { summary: "24px" }
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
currentPage: {
|
|
84
|
+
description: "Current active page",
|
|
85
|
+
table: {
|
|
86
|
+
type: { summary: "number" },
|
|
87
|
+
defaultValue: { summary: undefined }
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
fontSize: {
|
|
91
|
+
descripton: "Font size of page buttons",
|
|
92
|
+
table: {
|
|
93
|
+
type: { summary: "string" },
|
|
94
|
+
defaultValue: { summary: "17px" }
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
fontWeight: {
|
|
98
|
+
description: "Font weight of page buttons",
|
|
99
|
+
table: {
|
|
100
|
+
type: { summary: "string" },
|
|
101
|
+
defaultValue: { summary: "900" }
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
numberColor: {
|
|
105
|
+
description:
|
|
106
|
+
"Override for color of pagination number buttons, if undefined will use themed values",
|
|
107
|
+
table: {
|
|
108
|
+
type: { summary: "string" },
|
|
109
|
+
defaultValue: { summary: undefined }
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
pageCount: {
|
|
113
|
+
description: "Total number of pages",
|
|
114
|
+
table: {
|
|
115
|
+
type: { summary: "number" },
|
|
116
|
+
defaultValue: { summary: undefined }
|
|
117
|
+
}
|
|
118
|
+
},
|
|
119
|
+
pageNext: {
|
|
120
|
+
description: "Function to call when next button is clicked",
|
|
121
|
+
table: {
|
|
122
|
+
type: { summary: "function" },
|
|
123
|
+
defaultValue: { summary: undefined }
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
pagePrevious: {
|
|
127
|
+
description: "Function to call when previous button is clicked",
|
|
128
|
+
table: {
|
|
129
|
+
type: { summary: "function" },
|
|
130
|
+
defaultValue: { summary: undefined }
|
|
131
|
+
}
|
|
132
|
+
},
|
|
133
|
+
setCurrentPage: {
|
|
134
|
+
description: "Function to call when user selects a numerical page button",
|
|
135
|
+
table: {
|
|
136
|
+
type: { summary: "function" },
|
|
137
|
+
defaultValue: { summary: undefined }
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
};
|
|
26
142
|
|
|
27
|
-
|
|
28
|
-
title: "Components|Molecules/Pagination",
|
|
29
|
-
Component: Pagination
|
|
30
|
-
});
|
|
143
|
+
export default meta;
|
|
31
144
|
|
|
32
|
-
export
|
|
145
|
+
export const BasicPagination = {
|
|
146
|
+
args: {
|
|
147
|
+
activeBorderWidth: "3px",
|
|
148
|
+
childGap: "24px",
|
|
149
|
+
borderRadius: "4px",
|
|
150
|
+
fontSize: "14px",
|
|
151
|
+
buttonHeight: "44px",
|
|
152
|
+
buttonWidth: "44px",
|
|
153
|
+
fontWeight: FONT_WEIGHT_SEMIBOLD,
|
|
154
|
+
pageCount: 12,
|
|
155
|
+
ariaLabel: "Pagination"
|
|
156
|
+
},
|
|
157
|
+
render: args => {
|
|
158
|
+
const [currentPage, setCurrentPage] = useState(5);
|
|
159
|
+
|
|
160
|
+
return (
|
|
161
|
+
<Box
|
|
162
|
+
background={WHITE}
|
|
163
|
+
borderRadius="4px"
|
|
164
|
+
boxShadow={`0px 0px 5px 0px ${GHOST_GREY}`}
|
|
165
|
+
padding={"24px"}
|
|
166
|
+
>
|
|
167
|
+
<Pagination
|
|
168
|
+
{...args}
|
|
169
|
+
currentPage={currentPage}
|
|
170
|
+
pageNext={() =>
|
|
171
|
+
currentPage < 12 ? setCurrentPage(currentPage + 1) : fn()
|
|
172
|
+
}
|
|
173
|
+
pagePrevious={() =>
|
|
174
|
+
currentPage > 1 ? setCurrentPage(currentPage - 1) : fn()
|
|
175
|
+
}
|
|
176
|
+
setCurrentPage={page => setCurrentPage(page.pageNumber)}
|
|
177
|
+
/>
|
|
178
|
+
</Box>
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
};
|