@thecb/components 3.5.11 → 3.5.12-beta.0

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": "3.5.11",
3
+ "version": "3.5.12-beta.0",
4
4
  "description": "Common lib for CityBase react components",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -8,19 +8,21 @@ import { themeComponent } from "../../../util/themeUtils";
8
8
  const Alert = ({
9
9
  heading,
10
10
  text,
11
+ textOverride,
11
12
  variant,
12
13
  children,
13
14
  height,
14
15
  onLinkClick,
16
+ padding = "0.5rem",
15
17
  showQuitLink = true,
16
18
  themeValues
17
19
  }) => {
18
20
  const Icon = AlertIcons[variant];
19
21
  return (
20
22
  <Box
21
- padding="0.5rem"
23
+ padding={padding}
22
24
  width="100%"
23
- minHeight="100px"
25
+ minHeight={height && parseInt(height) < 100 ? height : "100px"}
24
26
  height={height ? height : "auto"}
25
27
  background={themeValues.background}
26
28
  borderRadius="4px"
@@ -37,17 +39,21 @@ const Alert = ({
37
39
  </Box>
38
40
  <Box padding="0">
39
41
  <Sidebar onRight width="24px" childGap="0rem">
40
- <Box padding="1rem">
42
+ <Box padding={`${padding} 1rem`}>
41
43
  <Cluster justify="flex-start" align="center">
42
- <Stack fullHeight childGap="0.25rem">
43
- <Text variant="p" color={themeValues.text} weight="600">
44
- {heading}
45
- </Text>
46
- <Text variant="pS" color={themeValues.text}>
47
- {text}
48
- </Text>
49
- {children}
50
- </Stack>
44
+ {textOverride ? (
45
+ textOverride
46
+ ) : (
47
+ <Stack fullHeight childGap="0.25rem">
48
+ <Text variant="p" color={themeValues.text} weight="600">
49
+ {heading}
50
+ </Text>
51
+ <Text variant="pS" color={themeValues.text}>
52
+ {text}
53
+ </Text>
54
+ {children}
55
+ </Stack>
56
+ )}
51
57
  </Cluster>
52
58
  </Box>
53
59
  <Cluster justify="flex-end" align="flex-start">
package/.tool-versions DELETED
@@ -1 +0,0 @@
1
- nodejs 10.15.3