Block Grid: Styling of group drag with handle (#20361)

* Adjustment of block grid group drag with handle

* Adjust input, handle and delete button
This commit is contained in:
Bjarne Fyrstenborg
2025-10-06 18:12:43 +02:00
committed by GitHub
parent fa5f6b9acc
commit 4330a99830

View File

@@ -232,35 +232,39 @@ export class UmbPropertyEditorUIBlockGridTypeConfigurationElement
#renderGroupInput(groupKey: string, groupName?: string) {
return html`<div class="group-handle">
<uui-icon name="icon-grip"></uui-icon>
<uui-input
auto-width
label="Group"
.value=${groupName ?? ''}
@change=${(e: UUIInputEvent) => this.#onGroupNameChange(e, groupKey)}>
<uui-button compact slot="append" label="delete" @click=${() => this.#deleteGroup(groupKey)}>
</uui-input>
<uui-button
compact
label=${this.localize.term('general_delete')}
look="outline"
@click=${() => this.#deleteGroup(groupKey)}>
<uui-icon name="icon-trash"></uui-icon>
</uui-button>
</uui-input>
</div>`;
}
static override styles = [
UmbTextStyles,
css`
uui-input:not(:hover, :focus) {
border: 1px solid transparent;
}
uui-input:not(:hover, :focus) uui-button {
opacity: 0;
}
.group-handle {
padding: var(--uui-size-1);
display: flex;
align-items: center;
padding: var(--uui-size-3) var(--uui-size-1);
margin-top: var(--uui-size-6);
margin-bottom: var(--uui-size-4);
gap: var(--uui-size-1);
cursor: grab;
}
.group-handle:active {
cursor: grabbing;
}
.group-handle:hover {
background-color: var(--uui-color-divider);
border-radius: var(--uui-border-radius);
@@ -269,6 +273,10 @@ export class UmbPropertyEditorUIBlockGridTypeConfigurationElement
.group:has([drag-placeholder]) {
opacity: 0.2;
}
uui-input {
flex: 1;
}
`,
];
}