fix: add close buttons to mobile sidebars

- RightSidebar: added onCollapse prop and close button in header

- LeftSidebar: wired existing onCollapse prop in App.tsx

- CSS: show .leftbar-toggle and .rightbar-close on mobile

- Both buttons call setMobile{Left,Right}Open(false) to close overlays
This commit is contained in:
2026-06-28 22:35:33 +02:00
parent 8c878e4bba
commit 3f93a236e1
4 changed files with 24 additions and 0 deletions
+4
View File
@@ -23,9 +23,13 @@ const RightSidebar: React.FC<RightSidebarProps> = ({
onRenameBlock, onDuplicateBlock, onDeleteBlock, onSvgImport, onSaveGroupAsBlock,
onBlockCategoryChange, onBlockSearch, onDragBlock,
kiMessages, kiSuggestions, onKISend, onKISuggestionClick, kiLoading, onUpdateElement,
onCollapse,
}) => {
return (
<aside className={`rightbar${className ? ' ' + className : ''}`} aria-label="Eigenschaften-Panels">
<button className="rightbar-close" aria-label="Rechte Leiste schließen" onClick={onCollapse}>
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="9 18 15 12 9 6"/></svg>
</button>
<div className="rightbar-tabs" role="tablist">
{tabs.map((tab) => (
<button