Web: "Neue Kategorie"-Button auf Hoehe des Auswahlfelds

Eigene unsichtbare Beschriftungszeile ueber dem Knopf, damit er auf gleicher
Hoehe wie das Kategorie-Auswahlfeld beginnt - statt am oberen oder unteren
Zeilenrand zu kleben.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Scarriffle
2026-07-27 21:23:38 +02:00
parent 8d34e2e8d8
commit 46f9c69a39

View File

@@ -656,8 +656,11 @@ export default function ProductForm() {
/> />
</label> </label>
{isAdmin && ( {isAdmin && (
<div style={{ display: "flex", alignSelf: "flex-end", marginBottom: 2 }}> // Eigene, unsichtbare Beschriftungszeile, damit der Knopf auf
<button type="button" className="btn" // gleicher Höhe wie das Auswahlfeld beginnt (nicht am Zeilenrand).
<div style={{ marginBottom: "var(--sp-4)" }}>
<div aria-hidden="true" style={{ visibility: "hidden", fontSize: "0.8rem", fontWeight: 580 }}>&nbsp;</div>
<button type="button" className="btn" style={{ width: "auto", marginTop: 5 }}
onClick={() => (newCat ? setNewCat(null) : openNewCat())}> onClick={() => (newCat ? setNewCat(null) : openNewCat())}>
<Icon name="plus" size={16} />Neue Kategorie <Icon name="plus" size={16} />Neue Kategorie
</button> </button>