Skip to content

Commit 4330a99

Browse files
authored
Block Grid: Styling of group drag with handle (#20361)
* Adjustment of block grid group drag with handle * Adjust input, handle and delete button
1 parent fa5f6b9 commit 4330a99

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

src/Umbraco.Web.UI.Client/src/packages/block/block-grid/property-editors/block-grid-type-configuration/property-editor-ui-block-grid-type-configuration.element.ts

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -232,35 +232,39 @@ export class UmbPropertyEditorUIBlockGridTypeConfigurationElement
232232

233233
#renderGroupInput(groupKey: string, groupName?: string) {
234234
return html`<div class="group-handle">
235+
<uui-icon name="icon-grip"></uui-icon>
235236
<uui-input
236-
auto-width
237237
label="Group"
238238
.value=${groupName ?? ''}
239239
@change=${(e: UUIInputEvent) => this.#onGroupNameChange(e, groupKey)}>
240-
<uui-button compact slot="append" label="delete" @click=${() => this.#deleteGroup(groupKey)}>
241-
<uui-icon name="icon-trash"></uui-icon>
242-
</uui-button>
243240
</uui-input>
241+
<uui-button
242+
compact
243+
label=${this.localize.term('general_delete')}
244+
look="outline"
245+
@click=${() => this.#deleteGroup(groupKey)}>
246+
<uui-icon name="icon-trash"></uui-icon>
247+
</uui-button>
244248
</div>`;
245249
}
246250

247251
static override styles = [
248252
UmbTextStyles,
249253
css`
250-
uui-input:not(:hover, :focus) {
251-
border: 1px solid transparent;
252-
}
253-
uui-input:not(:hover, :focus) uui-button {
254-
opacity: 0;
255-
}
256-
257254
.group-handle {
258-
padding: var(--uui-size-1);
255+
display: flex;
256+
align-items: center;
257+
padding: var(--uui-size-3) var(--uui-size-1);
259258
margin-top: var(--uui-size-6);
260259
margin-bottom: var(--uui-size-4);
260+
gap: var(--uui-size-1);
261261
cursor: grab;
262262
}
263263
264+
.group-handle:active {
265+
cursor: grabbing;
266+
}
267+
264268
.group-handle:hover {
265269
background-color: var(--uui-color-divider);
266270
border-radius: var(--uui-border-radius);
@@ -269,6 +273,10 @@ export class UmbPropertyEditorUIBlockGridTypeConfigurationElement
269273
.group:has([drag-placeholder]) {
270274
opacity: 0.2;
271275
}
276+
277+
uui-input {
278+
flex: 1;
279+
}
272280
`,
273281
];
274282
}

0 commit comments

Comments
 (0)