feat: library sidebar design tweaks (#6582)

This commit is contained in:
David Luzar
2023-05-13 13:18:14 +02:00
committed by GitHub
parent e619e06055
commit fff9d1522a
7 changed files with 128 additions and 68 deletions
+11 -11
View File
@@ -1,33 +1,33 @@
import { LibraryItem, ExcalidrawProps, UIAppState } from "../types";
import { ExcalidrawProps, UIAppState } from "../types";
import LibraryMenuBrowseButton from "./LibraryMenuBrowseButton";
import { LibraryDropdownMenu } from "./LibraryMenuHeaderContent";
import clsx from "clsx";
export const LibraryMenuControlButtons = ({
selectedItems,
onSelectItems,
libraryReturnUrl,
theme,
id,
style,
children,
className,
}: {
selectedItems: LibraryItem["id"][];
onSelectItems: (id: LibraryItem["id"][]) => void;
libraryReturnUrl: ExcalidrawProps["libraryReturnUrl"];
theme: UIAppState["theme"];
id: string;
style: React.CSSProperties;
children?: React.ReactNode;
className?: string;
}) => {
return (
<div className="library-menu-control-buttons" style={style}>
<div
className={clsx("library-menu-control-buttons", className)}
style={style}
>
<LibraryMenuBrowseButton
id={id}
libraryReturnUrl={libraryReturnUrl}
theme={theme}
/>
<LibraryDropdownMenu
selectedItems={selectedItems}
onSelectItems={onSelectItems}
/>
{children}
</div>
);
};