Skip to content

Commit

Permalink
Merge pull request #165 from liam-hq/fix-layout
Browse files Browse the repository at this point in the history
fix: fix layout for text overflow
  • Loading branch information
MH4GF authored Dec 5, 2024
2 parents ef2605c + e5a28ea commit bc7eba2
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.tableName {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
} from '@liam-hq/ui'
import { Table2 } from '@liam-hq/ui'
import { useDBStructureStore } from '../../../stores'
import styles from './LeftPane.module.css'
import { TableCounter } from './TableCounter'

export const LeftPane = () => {
Expand All @@ -28,7 +29,7 @@ export const LeftPane = () => {
<SidebarMenuItem key={table.name}>
<SidebarMenuButton>
<Table2 width="10px" />
<span>{table.name}</span>
<span className={styles.tableName}>{table.name}</span>
</SidebarMenuButton>
</SidebarMenuItem>
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@

.sidebarContent {
flex: 1 1 0%;
overflow-y: auto;
}

.sidebarMenuButton {
Expand Down

0 comments on commit bc7eba2

Please sign in to comment.