@thecb/components 7.1.3-beta.2 → 7.1.4-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/dist/index.cjs.js +13 -17
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.esm.js +13 -17
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/atoms/icons/WalletIconSmall.js +3 -3
- package/src/components/atoms/link/ExternalLink.d.ts +1 -1
- package/src/components/atoms/link/ExternalLink.js +13 -17
- package/src/components/atoms/link/ExternalLink.styled.js +1 -3
- package/src/components/atoms/link/InternalLink.d.ts +1 -1
- package/src/components/atoms/link/InternalLink.js +14 -18
- package/src/components/atoms/link/InternalLink.styled.js +2 -2
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@ import React from "react";
|
|
|
2
2
|
import { fallbackValues } from "./Icons.theme";
|
|
3
3
|
import { themeComponent } from "../../../util/themeUtils";
|
|
4
4
|
|
|
5
|
-
const WalletIconSmall = ({ themeValues }) => {
|
|
5
|
+
const WalletIconSmall = ({ themeValues, iconIndex = 0 }) => {
|
|
6
6
|
return (
|
|
7
7
|
<svg
|
|
8
8
|
width="20"
|
|
@@ -18,7 +18,7 @@ const WalletIconSmall = ({ themeValues }) => {
|
|
|
18
18
|
fill={themeValues.singleIconColor}
|
|
19
19
|
/>
|
|
20
20
|
<mask
|
|
21
|
-
id=
|
|
21
|
+
id={`mask0_503_574-${iconIndex}`}
|
|
22
22
|
style={{ maskType: "alpha" }}
|
|
23
23
|
maskUnits="userSpaceOnUse"
|
|
24
24
|
x="3"
|
|
@@ -33,7 +33,7 @@ const WalletIconSmall = ({ themeValues }) => {
|
|
|
33
33
|
fill="white"
|
|
34
34
|
/>
|
|
35
35
|
</mask>
|
|
36
|
-
<g mask=
|
|
36
|
+
<g mask={`url(#mask0_503_574-${iconIndex})`}>
|
|
37
37
|
<rect width="20" height="20" fill={themeValues.singleIconColor} />
|
|
38
38
|
</g>
|
|
39
39
|
</svg>
|
|
@@ -6,22 +6,19 @@ import { StyledExternalLink } from "./ExternalLink.styled";
|
|
|
6
6
|
import { FONT_WEIGHT_REGULAR } from "../../../constants/style_constants";
|
|
7
7
|
import { safeChildren } from "../../../util/general";
|
|
8
8
|
|
|
9
|
-
const ExternalLink = (
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
ref
|
|
24
|
-
) => {
|
|
9
|
+
const ExternalLink = ({
|
|
10
|
+
href = "",
|
|
11
|
+
newTab = false,
|
|
12
|
+
size = "1rem",
|
|
13
|
+
lineHeight = "1.5rem",
|
|
14
|
+
weight = FONT_WEIGHT_REGULAR,
|
|
15
|
+
extraStyles = ``,
|
|
16
|
+
variant = "primary",
|
|
17
|
+
tabIndex = "0",
|
|
18
|
+
dataQa,
|
|
19
|
+
ariaLabel,
|
|
20
|
+
children
|
|
21
|
+
}) => {
|
|
25
22
|
const themeContext = useContext(ThemeContext);
|
|
26
23
|
const themeValues = createThemeValues(
|
|
27
24
|
themeContext,
|
|
@@ -46,7 +43,6 @@ const ExternalLink = (
|
|
|
46
43
|
rel={newTab ? "noopener" : ""}
|
|
47
44
|
data-qa={dataQa}
|
|
48
45
|
aria-label={ariaLabel}
|
|
49
|
-
ref={ref}
|
|
50
46
|
>
|
|
51
47
|
{safeChildren(children, <span />)}
|
|
52
48
|
</StyledExternalLink>
|
|
@@ -8,9 +8,7 @@ import { ROYAL_BLUE } from "../../../constants/colors";
|
|
|
8
8
|
|
|
9
9
|
/* eslint-disable no-unused-vars */
|
|
10
10
|
export const StyledExternalLink = styled(
|
|
11
|
-
({ hoverColor, activeColor, extrastyles, ...props }
|
|
12
|
-
<a {...props} ref={ref} />
|
|
13
|
-
)
|
|
11
|
+
({ hoverColor, activeColor, extrastyles, ...props }) => <a {...props} />
|
|
14
12
|
)`
|
|
15
13
|
display: flex;
|
|
16
14
|
font-size: ${({ size }) => size};
|
|
@@ -5,23 +5,20 @@ import { createThemeValues } from "../../../util/themeUtils";
|
|
|
5
5
|
import { StyledInternalLink } from "./InternalLink.styled";
|
|
6
6
|
import { safeChildren } from "../../../util/general";
|
|
7
7
|
|
|
8
|
-
const InternalLink = (
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
},
|
|
23
|
-
ref
|
|
24
|
-
) => {
|
|
8
|
+
const InternalLink = ({
|
|
9
|
+
to = "",
|
|
10
|
+
color,
|
|
11
|
+
children,
|
|
12
|
+
active,
|
|
13
|
+
fontSize,
|
|
14
|
+
lineheight,
|
|
15
|
+
fontWeight,
|
|
16
|
+
variant = "primary",
|
|
17
|
+
margin,
|
|
18
|
+
tabIndex = "0",
|
|
19
|
+
dataQa,
|
|
20
|
+
extraStyles = ``
|
|
21
|
+
}) => {
|
|
25
22
|
const themeContext = useContext(ThemeContext);
|
|
26
23
|
const themeValues = createThemeValues(
|
|
27
24
|
themeContext,
|
|
@@ -45,7 +42,6 @@ const InternalLink = (
|
|
|
45
42
|
tabIndex={tabIndex}
|
|
46
43
|
extrastyles={extraStyles}
|
|
47
44
|
data-qa={dataQa}
|
|
48
|
-
ref={ref}
|
|
49
45
|
>
|
|
50
46
|
{safeChildren(children, <span />)}
|
|
51
47
|
</StyledInternalLink>
|
|
@@ -9,8 +9,8 @@ import { ROYAL_BLUE } from "../../../constants/colors";
|
|
|
9
9
|
|
|
10
10
|
/* eslint-disable no-unused-vars */
|
|
11
11
|
export const StyledInternalLink = styled(
|
|
12
|
-
({ hoverColor, activeColor, active, color, extrastyles, ...props }
|
|
13
|
-
<Link {...props}
|
|
12
|
+
({ hoverColor, activeColor, active, color, extrastyles, ...props }) => (
|
|
13
|
+
<Link {...props} />
|
|
14
14
|
)
|
|
15
15
|
)`
|
|
16
16
|
display: flex;
|