@thecb/components 7.8.0 → 7.8.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,4 +1,4 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { repeat } from "ramda";
|
|
3
3
|
|
|
4
4
|
import { fallbackValues } from "./HighlightTabRow.theme";
|
|
@@ -41,7 +41,7 @@ const HighlightTabRow = ({
|
|
|
41
41
|
<Center maxWidth="76.5rem">
|
|
42
42
|
<Reel
|
|
43
43
|
padding="0"
|
|
44
|
-
childGap="
|
|
44
|
+
childGap="0"
|
|
45
45
|
childWidth="11rem"
|
|
46
46
|
justifyContent="space-evenly"
|
|
47
47
|
disableScroll
|
|
@@ -60,6 +60,7 @@ const HighlightTabRow = ({
|
|
|
60
60
|
extraStyles="text-align: center; display: block;"
|
|
61
61
|
as="li"
|
|
62
62
|
aria-current={highlightIndex == i ? "step" : ""}
|
|
63
|
+
id={`${t?.toLowerCase()?.replace(/\s/g, "-")}-tab`}
|
|
63
64
|
>
|
|
64
65
|
<Text
|
|
65
66
|
variant="p"
|
|
@@ -79,6 +80,8 @@ const HighlightTabRow = ({
|
|
|
79
80
|
);
|
|
80
81
|
};
|
|
81
82
|
|
|
82
|
-
export default
|
|
83
|
-
|
|
83
|
+
export default themeComponent(
|
|
84
|
+
HighlightTabRow,
|
|
85
|
+
"HighlightTabRow",
|
|
86
|
+
fallbackValues
|
|
84
87
|
);
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import React, { Fragment, memo } from "react";
|
|
2
2
|
import { themeComponent } from "../../../util/themeUtils";
|
|
3
3
|
import { fallbackValues } from "./Module.theme";
|
|
4
|
-
import Heading from "../../atoms/heading";
|
|
5
4
|
import Title from "../../atoms/title";
|
|
6
|
-
import { Box } from "../../atoms/layouts";
|
|
5
|
+
import { Box, Cluster } from "../../atoms/layouts";
|
|
7
6
|
|
|
8
7
|
/*
|
|
9
8
|
New (01/22) - updated <Module /> to use <Title /> atom
|
|
@@ -25,6 +24,8 @@ const Module = ({
|
|
|
25
24
|
variant = "default",
|
|
26
25
|
fontSize,
|
|
27
26
|
as,
|
|
27
|
+
titleID = "",
|
|
28
|
+
rightTitleContent,
|
|
28
29
|
children
|
|
29
30
|
}) => {
|
|
30
31
|
const themedFontSize =
|
|
@@ -37,20 +38,28 @@ const Module = ({
|
|
|
37
38
|
const themedElemType =
|
|
38
39
|
variant === "small" ? "h6" : variant === "default" ? "h5" : "h2";
|
|
39
40
|
const computedElemType = as || themedElemType;
|
|
41
|
+
const headingText = (
|
|
42
|
+
<Title
|
|
43
|
+
weight={themeValues.fontWeight}
|
|
44
|
+
color={themeValues.fontColor}
|
|
45
|
+
margin={`${spacing} 0 ${themeValues.titleSpacing} 0`}
|
|
46
|
+
textAlign={themeValues.textAlign}
|
|
47
|
+
as={computedElemType}
|
|
48
|
+
extraStyles={`font-size: ${computedFontSize};`}
|
|
49
|
+
id={titleID}
|
|
50
|
+
>
|
|
51
|
+
{heading}
|
|
52
|
+
</Title>
|
|
53
|
+
);
|
|
40
54
|
|
|
41
55
|
return (
|
|
42
56
|
<Fragment>
|
|
43
|
-
{heading &&
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
as={computedElemType}
|
|
50
|
-
extraStyles={`font-size: ${computedFontSize};`}
|
|
51
|
-
>
|
|
52
|
-
{heading}
|
|
53
|
-
</Title>
|
|
57
|
+
{heading && !rightTitleContent && headingText}
|
|
58
|
+
{heading && rightTitleContent && (
|
|
59
|
+
<Cluster justify="space-between" align="center" nowrap>
|
|
60
|
+
{headingText}
|
|
61
|
+
{rightTitleContent}
|
|
62
|
+
</Cluster>
|
|
54
63
|
)}
|
|
55
64
|
<Box padding={`0 0 ${spacingBottom}`}>
|
|
56
65
|
<Box
|