@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "9.5.2-beta.0",
3
+ "version": "9.6.0-beta.1",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -144,7 +144,7 @@ const ButtonWithAction = forwardRef(
144
144
  {contentOverride ? (
145
145
  children
146
146
  ) : (
147
- <Center intrinsic>
147
+ <Center as="span" intrinsic>
148
148
  {isLoading ? (
149
149
  <Spinner color={loadingColor} isMobile={isMobile} />
150
150
  ) : (
@@ -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
- };