Skip to content

Commit

Permalink
move cell wrap style to cell content
Browse files Browse the repository at this point in the history
  • Loading branch information
pan-kot committed Nov 26, 2024
1 parent 49a178d commit 4c9b8a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 6 additions & 5 deletions src/table/body-cell/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,12 @@ $cell-negative-space-vertical: 2px;

&-content {
box-sizing: border-box;
}
&:not(.body-cell-wrap) > .body-cell-content {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;

&:not(.body-cell-wrap) {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
}
&:first-child {
border-inline-start: $border-placeholder;
Expand Down
3 changes: 1 addition & 2 deletions src/table/body-cell/td-element.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ export const TableTdElement = React.forwardRef<HTMLTableCellElement, TableTdElem
style={{ ...style, ...stickyStyles.style }}
className={clsx(
styles['body-cell'],
wrapLines && styles['body-cell-wrap'],
isFirstRow && styles['body-cell-first-row'],
isLastRow && styles['body-cell-last-row'],
isSelected && styles['body-cell-selected'],
Expand Down Expand Up @@ -159,7 +158,7 @@ export const TableTdElement = React.forwardRef<HTMLTableCellElement, TableTdElem
</div>
)}

<div className={styles['body-cell-content']}>{children}</div>
<div className={clsx(styles['body-cell-content'], wrapLines && styles['body-cell-wrap'])}>{children}</div>
</Element>
);
}
Expand Down

0 comments on commit 4c9b8a8

Please sign in to comment.