@thecb/components 9.5.2-beta.0 → 9.6.0-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/dist/index.cjs.js +3 -5
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +3 -5
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/button-with-action/ButtonWithAction.js +1 -1
- package/src/components/molecules/editable-list/EditableList.js +1 -3
- package/src/components/molecules/editable-list/EditableList.stories.js +0 -31
package/package.json
CHANGED
|
@@ -39,8 +39,7 @@ const EditableList = ({
|
|
|
39
39
|
as = "p",
|
|
40
40
|
listPadding = "0rem 0rem 1.5rem 0rem",
|
|
41
41
|
qaPrefix,
|
|
42
|
-
ariaLabel
|
|
43
|
-
editItemAriaRole = ""
|
|
42
|
+
ariaLabel
|
|
44
43
|
}) => {
|
|
45
44
|
const addText = `Add a${
|
|
46
45
|
itemName[0].match(/[aieouAIEOU]/) ? "n" : ""
|
|
@@ -152,7 +151,6 @@ const EditableList = ({
|
|
|
152
151
|
action={() => editItem(item.id)}
|
|
153
152
|
extraStyles={`min-width: 0;`}
|
|
154
153
|
aria-label={`Edit ${ariaLabel || itemName}`}
|
|
155
|
-
role={editItemAriaRole}
|
|
156
154
|
/>
|
|
157
155
|
</Box>
|
|
158
156
|
)}
|
|
@@ -1,31 +0,0 @@
|
|
|
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
|
-
};
|