Skip to content

Commit

Permalink
fix: Add text overflow handling for table header and column names
Browse files Browse the repository at this point in the history
  • Loading branch information
MH4GF committed Dec 5, 2024
1 parent a38ddfd commit e5a28ea
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@
font-weight: 500;
line-height: normal;
}

.name {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const TableHeader: FC<Props> = ({ name }) => {
return (
<div className={styles.wrapper}>
<Table2 width={16} />
<span>{name}</span>
<span className={styles.name}>{name}</span>
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,17 @@
color: var(--overlay-70);
}

.columnName {
.columnNameWrapper {
display: inline-flex;
justify-content: space-between;
}

.columnName {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

.columnType {
color: var(--overlay-70, rgba(255, 255, 255, 0.7));
text-align: right;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export const TableNode: FC<Props> = ({ data: { table } }) => {
/>
))}

<span className={styles.columnName}>
<span>{column.name}</span>
<span className={styles.columnNameWrapper}>
<span className={styles.columnName}>{column.name}</span>
<span className={styles.columnType}>{column.type}</span>
</span>
</li>
Expand Down

0 comments on commit e5a28ea

Please sign in to comment.