diff --git a/src/ElementeApp.jsx b/src/ElementeApp.jsx index a56bfb6..a09f096 100644 --- a/src/ElementeApp.jsx +++ b/src/ElementeApp.jsx @@ -49,7 +49,8 @@ function ReferenzSelector({ value, onChange }) { ) } -// Pill-Button — kompakt, Icon + Label horizontal, abgerundet +// Raster-Kachel — Icon oben, Label darunter, einheitliche Zellgroesse. +// hasMenu zeigt ein kleines Chevron neben dem Label (Rechtsklick = Untertypen). function PillButton({ icon, label, hint, onClick, onContextMenu, disabled, hasMenu, badge }) { return ( @@ -59,49 +60,58 @@ function PillButton({ icon, label, hint, onClick, onContextMenu, disabled, disabled={disabled} title={hint} style={{ - display: 'flex', alignItems: 'center', gap: 6, - padding: '5px 10px 5px 8px', - background: 'var(--bg-input)', - border: '1px solid var(--border-light)', - borderRadius: 999, + display: 'flex', flexDirection: 'column', + alignItems: 'center', justifyContent: 'center', gap: 6, + padding: '10px 4px', + minHeight: 56, + background: 'var(--bg-item)', + border: '1px solid transparent', + borderRadius: 10, cursor: disabled ? 'not-allowed' : 'pointer', opacity: disabled ? 0.4 : 1, - transition: 'background 0.1s, border-color 0.1s', - fontSize: 11, fontWeight: 500, + transition: 'background 0.12s, border-color 0.12s', + fontSize: 10, fontWeight: 500, color: 'var(--text-primary)', - whiteSpace: 'nowrap', position: 'relative', + width: '100%', + appearance: 'none', WebkitAppearance: 'none', }} onMouseEnter={(e) => { if (!disabled) { e.currentTarget.style.background = 'var(--bg-item-hover)' e.currentTarget.style.borderColor = 'var(--accent)' }}} onMouseLeave={(e) => { - e.currentTarget.style.background = 'var(--bg-input)' - e.currentTarget.style.borderColor = 'var(--border-light)' + e.currentTarget.style.background = 'var(--bg-item)' + e.currentTarget.style.borderColor = 'transparent' }} > - - {label} - {hasMenu && ( - - )} + + + {label} + {hasMenu && ( + + )} + {badge && ( {badge} )} ) } -// Vertikale Kategorie-Gruppe mit Label + Pills, die wrappen +// Kategorie-Gruppe: Label + einheitliches Raster (auto-fill Spalten) function PillGroup({ label, children }) { return ( -
+
{label} -
+
{children}
diff --git a/src/ToolsApp.jsx b/src/ToolsApp.jsx index 9fc1f19..804e572 100644 --- a/src/ToolsApp.jsx +++ b/src/ToolsApp.jsx @@ -54,7 +54,7 @@ const TOOLS = { // --------------------------------------------------------------------------- -function ToolPill({ icon, label, cmd, tip }) { +function ToolTile({ icon, label, cmd, tip }) { return ( ) } -function PillGroup({ label, children }) { +function GridSection({ label, children }) { return ( -
+
{label} -
+
{children}
@@ -122,11 +130,11 @@ export default function WerkzeugeApp() { overflowY: 'auto', overflowX: 'hidden', }}> {groups.map(([title, items]) => ( - + {items.map(([icon, label, cmd, tip]) => ( - + ))} - + ))}
)