@skyscanner/backpack-web 40.0.3 → 40.1.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.
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
* See the License for the specific language governing permissions and
|
|
16
16
|
* limitations under the License.
|
|
17
17
|
*/
|
|
18
|
-
.bpk-table{width:100%;margin-bottom:.5rem;border-collapse:collapse;table-layout:fixed;box-shadow:0 0 0 1px #c1c7cf}.bpk-table__cell{padding:1rem}.bpk-table__cell--head{background-color:#eff3f8;text-align:left;font-size:1rem;line-height:1.5rem;font-weight:700}html[dir=rtl] .bpk-table__cell--head{text-align:right}
|
|
18
|
+
.bpk-table{width:100%;margin-bottom:.5rem;border-collapse:collapse;table-layout:fixed;box-shadow:0 0 0 1px #c1c7cf}.bpk-table__cell{padding:1rem}.bpk-table__cell--head{background-color:#eff3f8;text-align:left;font-size:1rem;line-height:1.5rem;font-weight:700}html[dir=rtl] .bpk-table__cell--head{text-align:right}.bpk-table__cell--wordBreak{white-space:normal;word-break:break-word}
|
|
@@ -22,9 +22,11 @@ const getClassName = cssModules(STYLES);
|
|
|
22
22
|
const BpkTableCell = ({
|
|
23
23
|
children,
|
|
24
24
|
className = null,
|
|
25
|
+
wordBreak = false,
|
|
25
26
|
...rest
|
|
26
27
|
}) => {
|
|
27
|
-
const
|
|
28
|
+
const classes = ['bpk-table__cell', wordBreak && 'bpk-table__cell--wordBreak', className];
|
|
29
|
+
const classNames = getClassName(...classes);
|
|
28
30
|
return (
|
|
29
31
|
/*#__PURE__*/
|
|
30
32
|
// $FlowFixMe[cannot-spread-inexact] - inexact rest. See decisions/flowfixme.md
|
|
@@ -37,6 +39,7 @@ const BpkTableCell = ({
|
|
|
37
39
|
};
|
|
38
40
|
BpkTableCell.propTypes = {
|
|
39
41
|
className: PropTypes.string,
|
|
40
|
-
children: PropTypes.node.isRequired
|
|
42
|
+
children: PropTypes.node.isRequired,
|
|
43
|
+
wordBreak: PropTypes.bool
|
|
41
44
|
};
|
|
42
45
|
export default BpkTableCell;
|
|
@@ -22,9 +22,11 @@ const getClassName = cssModules(STYLES);
|
|
|
22
22
|
const BpkTableHeadCell = ({
|
|
23
23
|
children,
|
|
24
24
|
className = null,
|
|
25
|
+
wordBreak = false,
|
|
25
26
|
...rest
|
|
26
27
|
}) => {
|
|
27
|
-
const
|
|
28
|
+
const classes = ['bpk-table__cell', 'bpk-table__cell--head', wordBreak && 'bpk-table__cell--wordBreak', className];
|
|
29
|
+
const classNames = getClassName(...classes);
|
|
28
30
|
return /*#__PURE__*/_jsx("th", {
|
|
29
31
|
className: classNames,
|
|
30
32
|
...rest,
|
|
@@ -33,6 +35,7 @@ const BpkTableHeadCell = ({
|
|
|
33
35
|
};
|
|
34
36
|
BpkTableHeadCell.propTypes = {
|
|
35
37
|
children: PropTypes.node.isRequired,
|
|
36
|
-
className: PropTypes.string
|
|
38
|
+
className: PropTypes.string,
|
|
39
|
+
wordBreak: PropTypes.bool
|
|
37
40
|
};
|
|
38
41
|
export default BpkTableHeadCell;
|