@telus-uds/components-web 4.13.0 → 4.14.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/CHANGELOG.md +24 -1
- package/lib/cjs/IconButton/IconButton.js +1 -1
- package/lib/cjs/Table/Cell.js +14 -2
- package/lib/cjs/Table/Header.js +6 -2
- package/lib/cjs/Table/SubHeading.js +6 -2
- package/lib/esm/IconButton/IconButton.js +1 -1
- package/lib/esm/Table/Cell.js +14 -2
- package/lib/esm/Table/Header.js +6 -2
- package/lib/esm/Table/SubHeading.js +6 -2
- package/package.json +3 -3
- package/src/IconButton/IconButton.jsx +4 -1
- package/src/Table/Cell.jsx +18 -2
- package/src/Table/Header.jsx +5 -3
- package/src/Table/SubHeading.jsx +5 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
# Change Log - @telus-uds/components-web
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Wed, 19 Nov 2025 05:51:40 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 4.14.0
|
|
8
|
+
|
|
9
|
+
Wed, 19 Nov 2025 05:51:40 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- `IconButton`: add new actions (guillermo.peitzner@telus.com)
|
|
14
|
+
- Bump @telus-uds/components-base to v3.23.0
|
|
15
|
+
- Bump @telus-uds/system-theme-tokens to v4.16.0
|
|
16
|
+
|
|
17
|
+
### Patches
|
|
18
|
+
|
|
19
|
+
- `Table`: fix token override (guillermo.peitzner@telus.com)
|
|
20
|
+
|
|
21
|
+
## 4.13.1
|
|
22
|
+
|
|
23
|
+
Wed, 29 Oct 2025 07:40:46 GMT
|
|
24
|
+
|
|
25
|
+
### Patches
|
|
26
|
+
|
|
27
|
+
- `Interactive Card`: extra spacing fixed in interactive Cards when padding tokens are set to none (35577399+JoshHC@users.noreply.github.com)
|
|
28
|
+
- Bump @telus-uds/components-base to v3.22.0
|
|
29
|
+
|
|
7
30
|
## 4.13.0
|
|
8
31
|
|
|
9
32
|
Tue, 21 Oct 2025 14:46:26 GMT
|
|
@@ -38,7 +38,7 @@ const IconButton = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
38
38
|
})
|
|
39
39
|
);
|
|
40
40
|
});
|
|
41
|
-
const multiBrandIconNames = ['add', 'subtract', 'close', 'play', 'moveUp', 'moveDown', 'moveLeft', 'moveRight', 'expand'];
|
|
41
|
+
const multiBrandIconNames = ['add', 'subtract', 'close', 'play', 'moveUp', 'moveDown', 'moveLeft', 'moveRight', 'expand', 'menu', 'cart', 'profile'];
|
|
42
42
|
IconButton.displayName = 'IconButton';
|
|
43
43
|
const propsWithoutIcon = _ref2 => {
|
|
44
44
|
let {
|
package/lib/cjs/Table/Cell.js
CHANGED
|
@@ -41,13 +41,17 @@ const sharedStyles = /*#__PURE__*/(0, _styledComponents.css)(["", ""], _ref2 =>
|
|
|
41
41
|
cellBackground,
|
|
42
42
|
cellStickyShadow,
|
|
43
43
|
stickyBackgroundColor,
|
|
44
|
+
cellBottomLeftBorderRadius,
|
|
45
|
+
cellBottomRightBorderRadius,
|
|
46
|
+
cellTopLeftBorderRadius,
|
|
47
|
+
cellTopRightBorderRadius,
|
|
44
48
|
type
|
|
45
49
|
} = _ref2;
|
|
46
|
-
return (0, _styledComponents.css)(["text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;background-color:", ";", ";border-style:", ";border-color:", ";border-width:", ";border-top-width:", ";"], align, cellMinWidth, cellPaddingTop, cellPaddingRight, cellPaddingBottom, cellPaddingLeft, cellBackground, isSticky && stickyStyles({
|
|
50
|
+
return (0, _styledComponents.css)(["text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;background-color:", ";", ";border-style:", ";border-color:", ";border-width:", "px;border-top-width:", "px;border-bottom-left-radius:", "px;border-bottom-right-radius:", "px;border-top-left-radius:", "px;border-top-right-radius:", "px;"], align, cellMinWidth, cellPaddingTop, cellPaddingRight, cellPaddingBottom, cellPaddingLeft, cellBackground, isSticky && stickyStyles({
|
|
47
51
|
type,
|
|
48
52
|
cellStickyShadow,
|
|
49
53
|
stickyBackgroundColor
|
|
50
|
-
}), cellBorderWidth || cellBorderTopWidth ? 'solid' : 'none', cellBorderColor, cellBorderWidth, cellBorderTopWidth || cellBorderWidth);
|
|
54
|
+
}), cellBorderWidth || cellBorderTopWidth ? 'solid' : 'none', cellBorderColor, cellBorderWidth, cellBorderTopWidth || cellBorderWidth, cellBottomLeftBorderRadius, cellBottomRightBorderRadius, cellTopLeftBorderRadius, cellTopRightBorderRadius);
|
|
51
55
|
});
|
|
52
56
|
const createStyledCell = htmlElement => _styledComponents.default[htmlElement].withConfig({
|
|
53
57
|
displayName: "Cell__createStyledCell",
|
|
@@ -99,6 +103,10 @@ const Cell = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
99
103
|
cellBorderWidth,
|
|
100
104
|
cellBorderColor,
|
|
101
105
|
cellBorderTopWidth,
|
|
106
|
+
cellTopLeftBorderRadius,
|
|
107
|
+
cellTopRightBorderRadius,
|
|
108
|
+
cellBottomLeftBorderRadius,
|
|
109
|
+
cellBottomRightBorderRadius,
|
|
102
110
|
fontName,
|
|
103
111
|
fontWeight,
|
|
104
112
|
fontSize,
|
|
@@ -125,6 +133,10 @@ const Cell = /*#__PURE__*/_react.default.forwardRef((_ref5, ref) => {
|
|
|
125
133
|
cellBorderWidth,
|
|
126
134
|
cellBorderColor,
|
|
127
135
|
cellBorderTopWidth,
|
|
136
|
+
cellTopLeftBorderRadius,
|
|
137
|
+
cellTopRightBorderRadius,
|
|
138
|
+
cellBottomLeftBorderRadius,
|
|
139
|
+
cellBottomRightBorderRadius,
|
|
128
140
|
stickyBackgroundColor,
|
|
129
141
|
cellBoxShadowColor,
|
|
130
142
|
display,
|
package/lib/cjs/Table/Header.js
CHANGED
|
@@ -6,16 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _componentsBase = require("@telus-uds/components-base");
|
|
9
10
|
var _Row = _interopRequireDefault(require("./Row"));
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
13
|
const Header = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
13
14
|
let {
|
|
14
|
-
children
|
|
15
|
+
children,
|
|
16
|
+
tokens
|
|
15
17
|
} = _ref;
|
|
16
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)("thead", {
|
|
17
19
|
ref: ref,
|
|
18
20
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Row.default, {
|
|
21
|
+
tokens: tokens,
|
|
19
22
|
children: _react.default.Children.map(children, child =>
|
|
20
23
|
/*#__PURE__*/
|
|
21
24
|
// TO DO: pass type as a variant instead of prop
|
|
@@ -27,6 +30,7 @@ const Header = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
27
30
|
});
|
|
28
31
|
Header.displayName = 'Header';
|
|
29
32
|
Header.propTypes = {
|
|
30
|
-
children: _propTypes.default.node
|
|
33
|
+
children: _propTypes.default.node,
|
|
34
|
+
tokens: (0, _componentsBase.getTokensPropType)('Table')
|
|
31
35
|
};
|
|
32
36
|
var _default = exports.default = Header;
|
|
@@ -6,15 +6,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
var _componentsBase = require("@telus-uds/components-base");
|
|
9
10
|
var _Row = _interopRequireDefault(require("./Row"));
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
12
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
13
|
const Header = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
13
14
|
let {
|
|
14
|
-
children
|
|
15
|
+
children,
|
|
16
|
+
tokens
|
|
15
17
|
} = _ref;
|
|
16
18
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Row.default, {
|
|
17
19
|
ref: ref,
|
|
20
|
+
tokens: tokens,
|
|
18
21
|
children: _react.default.Children.map(children, child =>
|
|
19
22
|
/*#__PURE__*/
|
|
20
23
|
// TO DO: pass type as a variant instead of prop
|
|
@@ -25,6 +28,7 @@ const Header = /*#__PURE__*/_react.default.forwardRef((_ref, ref) => {
|
|
|
25
28
|
});
|
|
26
29
|
Header.displayName = 'Header';
|
|
27
30
|
Header.propTypes = {
|
|
28
|
-
children: _propTypes.default.node
|
|
31
|
+
children: _propTypes.default.node,
|
|
32
|
+
tokens: (0, _componentsBase.getTokensPropType)('Table')
|
|
29
33
|
};
|
|
30
34
|
var _default = exports.default = Header;
|
|
@@ -31,7 +31,7 @@ const IconButton = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
31
31
|
})
|
|
32
32
|
);
|
|
33
33
|
});
|
|
34
|
-
const multiBrandIconNames = ['add', 'subtract', 'close', 'play', 'moveUp', 'moveDown', 'moveLeft', 'moveRight', 'expand'];
|
|
34
|
+
const multiBrandIconNames = ['add', 'subtract', 'close', 'play', 'moveUp', 'moveDown', 'moveLeft', 'moveRight', 'expand', 'menu', 'cart', 'profile'];
|
|
35
35
|
IconButton.displayName = 'IconButton';
|
|
36
36
|
const propsWithoutIcon = _ref2 => {
|
|
37
37
|
let {
|
package/lib/esm/Table/Cell.js
CHANGED
|
@@ -32,13 +32,17 @@ const sharedStyles = /*#__PURE__*/css(["", ""], _ref2 => {
|
|
|
32
32
|
cellBackground,
|
|
33
33
|
cellStickyShadow,
|
|
34
34
|
stickyBackgroundColor,
|
|
35
|
+
cellBottomLeftBorderRadius,
|
|
36
|
+
cellBottomRightBorderRadius,
|
|
37
|
+
cellTopLeftBorderRadius,
|
|
38
|
+
cellTopRightBorderRadius,
|
|
35
39
|
type
|
|
36
40
|
} = _ref2;
|
|
37
|
-
return css(["text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;background-color:", ";", ";border-style:", ";border-color:", ";border-width:", ";border-top-width:", ";"], align, cellMinWidth, cellPaddingTop, cellPaddingRight, cellPaddingBottom, cellPaddingLeft, cellBackground, isSticky && stickyStyles({
|
|
41
|
+
return css(["text-align:", ";min-width:", "px;padding:", "px ", "px ", "px ", "px;background-color:", ";", ";border-style:", ";border-color:", ";border-width:", "px;border-top-width:", "px;border-bottom-left-radius:", "px;border-bottom-right-radius:", "px;border-top-left-radius:", "px;border-top-right-radius:", "px;"], align, cellMinWidth, cellPaddingTop, cellPaddingRight, cellPaddingBottom, cellPaddingLeft, cellBackground, isSticky && stickyStyles({
|
|
38
42
|
type,
|
|
39
43
|
cellStickyShadow,
|
|
40
44
|
stickyBackgroundColor
|
|
41
|
-
}), cellBorderWidth || cellBorderTopWidth ? 'solid' : 'none', cellBorderColor, cellBorderWidth, cellBorderTopWidth || cellBorderWidth);
|
|
45
|
+
}), cellBorderWidth || cellBorderTopWidth ? 'solid' : 'none', cellBorderColor, cellBorderWidth, cellBorderTopWidth || cellBorderWidth, cellBottomLeftBorderRadius, cellBottomRightBorderRadius, cellTopLeftBorderRadius, cellTopRightBorderRadius);
|
|
42
46
|
});
|
|
43
47
|
const createStyledCell = htmlElement => styled[htmlElement].withConfig({
|
|
44
48
|
displayName: "Cell__createStyledCell",
|
|
@@ -90,6 +94,10 @@ const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
90
94
|
cellBorderWidth,
|
|
91
95
|
cellBorderColor,
|
|
92
96
|
cellBorderTopWidth,
|
|
97
|
+
cellTopLeftBorderRadius,
|
|
98
|
+
cellTopRightBorderRadius,
|
|
99
|
+
cellBottomLeftBorderRadius,
|
|
100
|
+
cellBottomRightBorderRadius,
|
|
93
101
|
fontName,
|
|
94
102
|
fontWeight,
|
|
95
103
|
fontSize,
|
|
@@ -116,6 +124,10 @@ const Cell = /*#__PURE__*/React.forwardRef((_ref5, ref) => {
|
|
|
116
124
|
cellBorderWidth,
|
|
117
125
|
cellBorderColor,
|
|
118
126
|
cellBorderTopWidth,
|
|
127
|
+
cellTopLeftBorderRadius,
|
|
128
|
+
cellTopRightBorderRadius,
|
|
129
|
+
cellBottomLeftBorderRadius,
|
|
130
|
+
cellBottomRightBorderRadius,
|
|
119
131
|
stickyBackgroundColor,
|
|
120
132
|
cellBoxShadowColor,
|
|
121
133
|
display,
|
package/lib/esm/Table/Header.js
CHANGED
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { getTokensPropType } from '@telus-uds/components-base';
|
|
3
4
|
import Row from './Row';
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
const Header = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
6
7
|
let {
|
|
7
|
-
children
|
|
8
|
+
children,
|
|
9
|
+
tokens
|
|
8
10
|
} = _ref;
|
|
9
11
|
return /*#__PURE__*/_jsx("thead", {
|
|
10
12
|
ref: ref,
|
|
11
13
|
children: /*#__PURE__*/_jsx(Row, {
|
|
14
|
+
tokens: tokens,
|
|
12
15
|
children: React.Children.map(children, child =>
|
|
13
16
|
/*#__PURE__*/
|
|
14
17
|
// TO DO: pass type as a variant instead of prop
|
|
@@ -20,6 +23,7 @@ const Header = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
20
23
|
});
|
|
21
24
|
Header.displayName = 'Header';
|
|
22
25
|
Header.propTypes = {
|
|
23
|
-
children: PropTypes.node
|
|
26
|
+
children: PropTypes.node,
|
|
27
|
+
tokens: getTokensPropType('Table')
|
|
24
28
|
};
|
|
25
29
|
export default Header;
|
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import { getTokensPropType } from '@telus-uds/components-base';
|
|
3
4
|
import Row from './Row';
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
5
6
|
const Header = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
6
7
|
let {
|
|
7
|
-
children
|
|
8
|
+
children,
|
|
9
|
+
tokens
|
|
8
10
|
} = _ref;
|
|
9
11
|
return /*#__PURE__*/_jsx(Row, {
|
|
10
12
|
ref: ref,
|
|
13
|
+
tokens: tokens,
|
|
11
14
|
children: React.Children.map(children, child =>
|
|
12
15
|
/*#__PURE__*/
|
|
13
16
|
// TO DO: pass type as a variant instead of prop
|
|
@@ -18,6 +21,7 @@ const Header = /*#__PURE__*/React.forwardRef((_ref, ref) => {
|
|
|
18
21
|
});
|
|
19
22
|
Header.displayName = 'Header';
|
|
20
23
|
Header.propTypes = {
|
|
21
|
-
children: PropTypes.node
|
|
24
|
+
children: PropTypes.node,
|
|
25
|
+
tokens: getTokensPropType('Table')
|
|
22
26
|
};
|
|
23
27
|
export default Header;
|
package/package.json
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
],
|
|
6
6
|
"dependencies": {
|
|
7
7
|
"@gorhom/portal": "^1.0.14",
|
|
8
|
-
"@telus-uds/components-base": "^3.
|
|
8
|
+
"@telus-uds/components-base": "^3.23.0",
|
|
9
9
|
"@telus-uds/system-constants": "^3.0.0",
|
|
10
|
-
"@telus-uds/system-theme-tokens": "^4.
|
|
10
|
+
"@telus-uds/system-theme-tokens": "^4.16.0",
|
|
11
11
|
"fscreen": "^1.2.0",
|
|
12
12
|
"lodash.omit": "^4.5.0",
|
|
13
13
|
"lodash.throttle": "^4.1.1",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"skip": true
|
|
83
83
|
},
|
|
84
84
|
"types": "types/index.d.ts",
|
|
85
|
-
"version": "4.
|
|
85
|
+
"version": "4.14.0"
|
|
86
86
|
}
|
package/src/Table/Cell.jsx
CHANGED
|
@@ -46,6 +46,10 @@ const sharedStyles = css`
|
|
|
46
46
|
cellBackground,
|
|
47
47
|
cellStickyShadow,
|
|
48
48
|
stickyBackgroundColor,
|
|
49
|
+
cellBottomLeftBorderRadius,
|
|
50
|
+
cellBottomRightBorderRadius,
|
|
51
|
+
cellTopLeftBorderRadius,
|
|
52
|
+
cellTopRightBorderRadius,
|
|
49
53
|
type
|
|
50
54
|
}) => css`
|
|
51
55
|
text-align: ${align};
|
|
@@ -55,8 +59,12 @@ const sharedStyles = css`
|
|
|
55
59
|
${isSticky && stickyStyles({ type, cellStickyShadow, stickyBackgroundColor })};
|
|
56
60
|
border-style: ${cellBorderWidth || cellBorderTopWidth ? 'solid' : 'none'};
|
|
57
61
|
border-color: ${cellBorderColor};
|
|
58
|
-
border-width: ${cellBorderWidth};
|
|
59
|
-
border-top-width: ${cellBorderTopWidth || cellBorderWidth};
|
|
62
|
+
border-width: ${cellBorderWidth}px;
|
|
63
|
+
border-top-width: ${cellBorderTopWidth || cellBorderWidth}px;
|
|
64
|
+
border-bottom-left-radius: ${cellBottomLeftBorderRadius}px;
|
|
65
|
+
border-bottom-right-radius: ${cellBottomRightBorderRadius}px;
|
|
66
|
+
border-top-left-radius: ${cellTopLeftBorderRadius}px;
|
|
67
|
+
border-top-right-radius: ${cellTopRightBorderRadius}px;
|
|
60
68
|
`}
|
|
61
69
|
`
|
|
62
70
|
const createStyledCell = (htmlElement) => styled[htmlElement]`
|
|
@@ -98,6 +106,10 @@ const Cell = React.forwardRef(
|
|
|
98
106
|
cellBorderWidth,
|
|
99
107
|
cellBorderColor,
|
|
100
108
|
cellBorderTopWidth,
|
|
109
|
+
cellTopLeftBorderRadius,
|
|
110
|
+
cellTopRightBorderRadius,
|
|
111
|
+
cellBottomLeftBorderRadius,
|
|
112
|
+
cellBottomRightBorderRadius,
|
|
101
113
|
fontName,
|
|
102
114
|
fontWeight,
|
|
103
115
|
fontSize,
|
|
@@ -120,6 +132,10 @@ const Cell = React.forwardRef(
|
|
|
120
132
|
cellBorderWidth,
|
|
121
133
|
cellBorderColor,
|
|
122
134
|
cellBorderTopWidth,
|
|
135
|
+
cellTopLeftBorderRadius,
|
|
136
|
+
cellTopRightBorderRadius,
|
|
137
|
+
cellBottomLeftBorderRadius,
|
|
138
|
+
cellBottomRightBorderRadius,
|
|
123
139
|
stickyBackgroundColor,
|
|
124
140
|
cellBoxShadowColor,
|
|
125
141
|
display,
|
package/src/Table/Header.jsx
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
+
import { getTokensPropType } from '@telus-uds/components-base'
|
|
3
4
|
import Row from './Row'
|
|
4
5
|
|
|
5
|
-
const Header = React.forwardRef(({ children }, ref) => {
|
|
6
|
+
const Header = React.forwardRef(({ children, tokens }, ref) => {
|
|
6
7
|
return (
|
|
7
8
|
<thead ref={ref}>
|
|
8
|
-
<Row>
|
|
9
|
+
<Row tokens={tokens}>
|
|
9
10
|
{React.Children.map(children, (child) =>
|
|
10
11
|
// TO DO: pass type as a variant instead of prop
|
|
11
12
|
React.cloneElement(child, { type: 'heading' })
|
|
@@ -18,7 +19,8 @@ const Header = React.forwardRef(({ children }, ref) => {
|
|
|
18
19
|
Header.displayName = 'Header'
|
|
19
20
|
|
|
20
21
|
Header.propTypes = {
|
|
21
|
-
children: PropTypes.node
|
|
22
|
+
children: PropTypes.node,
|
|
23
|
+
tokens: getTokensPropType('Table')
|
|
22
24
|
}
|
|
23
25
|
|
|
24
26
|
export default Header
|
package/src/Table/SubHeading.jsx
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import PropTypes from 'prop-types'
|
|
3
|
+
import { getTokensPropType } from '@telus-uds/components-base'
|
|
3
4
|
import Row from './Row'
|
|
4
5
|
|
|
5
|
-
const Header = React.forwardRef(({ children }, ref) => {
|
|
6
|
+
const Header = React.forwardRef(({ children, tokens }, ref) => {
|
|
6
7
|
return (
|
|
7
|
-
<Row ref={ref}>
|
|
8
|
+
<Row ref={ref} tokens={tokens}>
|
|
8
9
|
{React.Children.map(children, (child) =>
|
|
9
10
|
// TO DO: pass type as a variant instead of prop
|
|
10
11
|
React.cloneElement(child, { type: 'subHeading' })
|
|
@@ -16,7 +17,8 @@ const Header = React.forwardRef(({ children }, ref) => {
|
|
|
16
17
|
Header.displayName = 'Header'
|
|
17
18
|
|
|
18
19
|
Header.propTypes = {
|
|
19
|
-
children: PropTypes.node
|
|
20
|
+
children: PropTypes.node,
|
|
21
|
+
tokens: getTokensPropType('Table')
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
export default Header
|