Skip to content

Commit

Permalink
Merge pull request #35 from jbetancur/34-enhancement-rows
Browse files Browse the repository at this point in the history
add row padding
  • Loading branch information
jbetancur authored Oct 9, 2018
2 parents 985b7b1 + 86871e2 commit f6f4ff9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/DataTable/TableCell.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ const TableCellStyle = styled.div`
min-height: ${props => props.theme.rows.height};
${props => props.column.right && 'justify-content: flex-end'};
${props => props.column.center && 'justify-content: center'};
padding-top: 3px;
padding-bottom: 3px;
padding-left: calc(${props => props.theme.cells.cellPadding} / 2);
padding-right: calc(${props => props.theme.cells.cellPadding} / 2);
${props => props.firstCellIndex > 0 && css`
Expand Down
3 changes: 2 additions & 1 deletion src/DataTable/TableCol.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ const ColumnCellWrapper = styled.div`
margin-left: -3px;
display: inline-flex;
align-items: center;
${props => props.active && 'font-weight: 800'};
`;

const SortIcon = styled.span`
Expand Down Expand Up @@ -126,7 +127,7 @@ class TableCol extends PureComponent {
firstCellIndex={firstCellIndex}
>
{column.name &&
<ColumnCellWrapper>
<ColumnCellWrapper active={sortable}>
{sortable && sortIcon &&
<SortIcon className={sortDirection === 'asc' ? 'asc' : 'desc'}>
{sortIcon}
Expand Down
2 changes: 2 additions & 0 deletions src/DataTable/__tests__/__snapshots__/TableCell.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ exports[`component <TableCell /> should render correctly 1`] = `
white-space: nowrap;
color: rgba(0,0,0,.87);
min-height: 48px;
padding-top: 3px;
padding-bottom: 3px;
padding-left: calc(48px / 2);
padding-right: calc(48px / 2);
}
Expand Down

0 comments on commit f6f4ff9

Please sign in to comment.