Skip to content

Commit f6f4ff9

Browse files
authored
Merge pull request #35 from jbetancur/34-enhancement-rows
add row padding
2 parents 985b7b1 + 86871e2 commit f6f4ff9

3 files changed

Lines changed: 6 additions & 1 deletion

File tree

src/DataTable/TableCell.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ const TableCellStyle = styled.div`
2929
min-height: ${props => props.theme.rows.height};
3030
${props => props.column.right && 'justify-content: flex-end'};
3131
${props => props.column.center && 'justify-content: center'};
32+
padding-top: 3px;
33+
padding-bottom: 3px;
3234
padding-left: calc(${props => props.theme.cells.cellPadding} / 2);
3335
padding-right: calc(${props => props.theme.cells.cellPadding} / 2);
3436
${props => props.firstCellIndex > 0 && css`

src/DataTable/TableCol.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ const ColumnCellWrapper = styled.div`
5656
margin-left: -3px;
5757
display: inline-flex;
5858
align-items: center;
59+
${props => props.active && 'font-weight: 800'};
5960
`;
6061

6162
const SortIcon = styled.span`
@@ -126,7 +127,7 @@ class TableCol extends PureComponent {
126127
firstCellIndex={firstCellIndex}
127128
>
128129
{column.name &&
129-
<ColumnCellWrapper>
130+
<ColumnCellWrapper active={sortable}>
130131
{sortable && sortIcon &&
131132
<SortIcon className={sortDirection === 'asc' ? 'asc' : 'desc'}>
132133
{sortIcon}

src/DataTable/__tests__/__snapshots__/TableCell.test.js.snap

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ exports[`component <TableCell /> should render correctly 1`] = `
2323
white-space: nowrap;
2424
color: rgba(0,0,0,.87);
2525
min-height: 48px;
26+
padding-top: 3px;
27+
padding-bottom: 3px;
2628
padding-left: calc(48px / 2);
2729
padding-right: calc(48px / 2);
2830
}

0 commit comments

Comments
 (0)