@thecb/components 8.4.8-beta.4 → 8.4.8-beta.5

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": "8.4.8-beta.4",
3
+ "version": "8.4.8-beta.5",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "typings": "dist/index.d.ts",
@@ -16,17 +16,18 @@ import { Box, Cluster } from "../../atoms/layouts";
16
16
  */
17
17
 
18
18
  const Module = ({
19
+ variant = "default",
20
+ as,
21
+ disabled,
19
22
  heading,
23
+ rightTitleContent,
24
+ titleID = "",
20
25
  spacing = "1rem",
21
26
  padding = "0",
22
- spacingBottom = "2.5rem",
23
27
  margin = "0",
24
- themeValues,
25
- variant = "default",
28
+ spacingBottom = "2.5rem",
26
29
  fontSize,
27
- as,
28
- titleID = "",
29
- rightTitleContent,
30
+ themeValues,
30
31
  children
31
32
  }) => {
32
33
  const themedFontSize =
@@ -39,6 +40,7 @@ const Module = ({
39
40
  const themedElemType =
40
41
  variant === "small" ? "h6" : variant === "default" ? "h5" : "h2";
41
42
  const computedElemType = as || themedElemType;
43
+ const disabledStyles = "opacity: 0.40;";
42
44
  const headingText = (
43
45
  <Title
44
46
  weight={themeValues.fontWeight}
@@ -54,7 +56,7 @@ const Module = ({
54
56
  );
55
57
 
56
58
  return (
57
- <Fragment>
59
+ <Box padding="0" extraStyles={disabled && disabledStyles}>
58
60
  {heading && !rightTitleContent && headingText}
59
61
  {heading && rightTitleContent && (
60
62
  <Cluster justify="space-between" align="center" nowrap>
@@ -72,7 +74,7 @@ const Module = ({
72
74
  {children}
73
75
  </Box>
74
76
  </Box>
75
- </Fragment>
77
+ </Box>
76
78
  );
77
79
  };
78
80