@thecb/components 11.4.1-beta.0 → 11.4.1-beta.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thecb/components",
3
- "version": "11.4.1-beta.0",
3
+ "version": "11.4.1-beta.2",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -149,7 +149,6 @@ const FormTextarea = ({
149
149
  (field.dirty && field.hasErrors) || (field.hasErrors && showErrors)
150
150
  }
151
151
  onChange={e => setValue(e.target.value)}
152
- onBlur={e => handleOnBlur(e.target.value)}
153
152
  value={field.rawValue}
154
153
  field={field}
155
154
  showErrors={showErrors}
@@ -18,13 +18,13 @@ const Tab = ({ label, activeTab, setActiveTab }) => {
18
18
  className={className}
19
19
  onClick={onClick}
20
20
  margin="0 0 -1px 0"
21
- padding="0.5rem 0.75rem"
21
+ padding="1rem 0.75rem"
22
22
  background={activeTab === label ? WHITE : GRECIAN_GREY}
23
23
  extraStyles={`cursor: pointer; flex-grow: 1; text-align: center; ${
24
24
  activeTab === label ? `list-style: none;` : ``
25
25
  }`}
26
26
  >
27
- <Text>{label}</Text>
27
+ <Text weight="600">{label}</Text>
28
28
  </Box>
29
29
  );
30
30
  };
@@ -6,7 +6,14 @@ import Tab from "../../atoms/tab";
6
6
 
7
7
  const HORIZONTAL = "horizontal";
8
8
 
9
- const Tabs = ({ tabsConfig, tabsDisplayMode = HORIZONTAL, ...props }) => {
9
+ const Tabs = ({
10
+ tabsConfig,
11
+ tabsDisplayMode = HORIZONTAL,
12
+ tabsPadding = "0",
13
+ contentPadding = "0",
14
+ extraStyles = "",
15
+ ...props
16
+ }) => {
10
17
  const [activeTab, toggleActiveTab] = useState(
11
18
  tabsConfig.tabs[0]?.label || null
12
19
  );
@@ -47,14 +54,14 @@ const Tabs = ({ tabsConfig, tabsDisplayMode = HORIZONTAL, ...props }) => {
47
54
  };
48
55
 
49
56
  return (
50
- <Box className="tabs" {...props}>
51
- <Box className="tab-list">
57
+ <Box className="tabs" padding="0" extraStyles={extraStyles} {...props}>
58
+ <Box className="tab-list" padding={tabsPadding}>
52
59
  {tabsDisplayMode == HORIZONTAL
53
60
  ? showHorizontal(tabsConfig, activeTab)
54
61
  : showVertical(tabsConfig, activeTab)}
55
62
  </Box>
56
- <Box className="tab-content">
57
- <Box>
63
+ <Box className="tab-content" padding={contentPadding}>
64
+ <Box padding="0">
58
65
  {tabsConfig.tabs.map((tab, idx) => {
59
66
  if (tab.label !== activeTab) return undefined;
60
67
  return <Fragment key={idx}>{tab.content}</Fragment>;