@thecb/components 9.5.1 → 9.5.2
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/dist/index.cjs.js +2811 -2852
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2811 -2852
- package/dist/index.esm.js.map +1 -1
- package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +49322 -0
- package/package.json +1 -1
- package/src/.DS_Store +0 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/atoms/.DS_Store +0 -0
- package/src/components/atoms/icons/.DS_Store +0 -0
- package/src/components/molecules/editable-list/EditableList.js +3 -1
- package/src/components/molecules/editable-list/EditableList.stories.js +31 -0
package/package.json
CHANGED
package/src/.DS_Store
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -39,7 +39,8 @@ const EditableList = ({
|
|
|
39
39
|
as = "p",
|
|
40
40
|
listPadding = "0rem 0rem 1.5rem 0rem",
|
|
41
41
|
qaPrefix,
|
|
42
|
-
ariaLabel
|
|
42
|
+
ariaLabel,
|
|
43
|
+
editItemAriaRole = ""
|
|
43
44
|
}) => {
|
|
44
45
|
const addText = `Add a${
|
|
45
46
|
itemName[0].match(/[aieouAIEOU]/) ? "n" : ""
|
|
@@ -151,6 +152,7 @@ const EditableList = ({
|
|
|
151
152
|
action={() => editItem(item.id)}
|
|
152
153
|
extraStyles={`min-width: 0;`}
|
|
153
154
|
aria-label={`Edit ${ariaLabel || itemName}`}
|
|
155
|
+
role={editItemAriaRole}
|
|
154
156
|
/>
|
|
155
157
|
</Box>
|
|
156
158
|
)}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React, { useState } from "react";
|
|
2
|
+
import { boolean } from "@storybook/addon-knobs";
|
|
3
|
+
|
|
4
|
+
import EditableList from "./EditableList";
|
|
5
|
+
import page from "../../../../.storybook/page";
|
|
6
|
+
|
|
7
|
+
const story = page({
|
|
8
|
+
title: "Components|Molecules/EditableList",
|
|
9
|
+
Component: EditableList
|
|
10
|
+
});
|
|
11
|
+
export default story;
|
|
12
|
+
|
|
13
|
+
export const editableList = () => {
|
|
14
|
+
return (
|
|
15
|
+
<EditableList
|
|
16
|
+
as="h2"
|
|
17
|
+
canRemove={false}
|
|
18
|
+
title="Contact first name"
|
|
19
|
+
titleWeight="600"
|
|
20
|
+
editItem={() => console.log("edit click")}
|
|
21
|
+
editItemAriaRole="link"
|
|
22
|
+
itemName="Contact first name"
|
|
23
|
+
listPadding="0"
|
|
24
|
+
renderItem={contactFirstName => contactFirstName}
|
|
25
|
+
maxItems={1}
|
|
26
|
+
items={["Ronald"]}
|
|
27
|
+
qaPrefix="Contact first name"
|
|
28
|
+
ariaLabel="Contact first name"
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
};
|