From 2a4ec83abef735cf64c249efff553462eea2b509 Mon Sep 17 00:00:00 2001 From: Anish Aggarwal Date: Wed, 26 Feb 2020 16:17:44 +0530 Subject: [PATCH] replaced empty th with td --- CHANGELOG.md | 1 + src/components/table/table_header_cell.tsx | 24 +++++++++++++++------- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 04d9369662d..39d2371c1ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ ## [`master`](https://github.com/elastic/eui/tree/master) +- Empty table th elements replaced with td in `EuiTable`. ([#2873](https://github.com/elastic/eui/pull/2873)) - Added SASS variables for text variants of the primary palette `$euiColorPrimaryText`, `$euiColorSecondaryText`, etc... Updated components to use these new variables. ([#2873](https://github.com/elastic/eui/pull/2873)) - Updated SASS mixin `makeHighContrastColor()` to default `$background: $euiPageBackgroundColor` and `$ratio: 4.5`. Created `makeGraphicContrastColor()` for graphic specific contrast levels of 3.0. ([#2873](https://github.com/elastic/eui/pull/2873)) diff --git a/src/components/table/table_header_cell.tsx b/src/components/table/table_header_cell.tsx index b0c8406e20b..48b7dd07796 100644 --- a/src/components/table/table_header_cell.tsx +++ b/src/components/table/table_header_cell.tsx @@ -146,16 +146,26 @@ export const EuiTableHeaderCell: FunctionComponent = ({ ); } + if (children) { + return ( + +
+ {children} +
+ + ); + } + return ( - +
{children}
- + ); };