Truncate long column names in column settings buttons

This commit is contained in:
Andrew Kingston 2024-06-10 09:52:49 +01:00
parent 7566ecfac8
commit 9047c54b03
2 changed files with 12 additions and 3 deletions

View File

@ -116,7 +116,9 @@
{#each displayColumns as column} {#each displayColumns as column}
<div class="column"> <div class="column">
<Icon size="S" name={getColumnIcon(column)} /> <Icon size="S" name={getColumnIcon(column)} />
{column.label} <div class="column-label" title={column.label}>
{column.label}
</div>
</div> </div>
<ToggleActionButtonGroup <ToggleActionButtonGroup
on:click={e => toggleColumn(column, e.detail)} on:click={e => toggleColumn(column, e.detail)}
@ -139,7 +141,8 @@
display: grid; display: grid;
align-items: center; align-items: center;
grid-template-columns: 1fr auto; grid-template-columns: 1fr auto;
gap: 8px; grid-row-gap: 8px;
grid-column-gap: 24px;
} }
.columns :global(.spectrum-Switch) { .columns :global(.spectrum-Switch) {
margin-right: 0; margin-right: 0;
@ -148,4 +151,11 @@
display: flex; display: flex;
gap: 8px; gap: 8px;
} }
.column-label {
min-width: 80px;
max-width: 200px;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
</style> </style>

View File

@ -29,7 +29,6 @@
.permissionPicker { .permissionPicker {
display: flex; display: flex;
gap: var(--spacing-xs); gap: var(--spacing-xs);
padding-left: calc(var(--spacing-xl) * 2);
} }
.permissionPicker :global(.spectrum-Icon) { .permissionPicker :global(.spectrum-Icon) {