mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-23 10:04:55 +02:00
Merge pull request
This commit is contained in:
+22
@@ -0,0 +1,22 @@
|
||||
import React from "react";
|
||||
|
||||
import { FirstPageOutlined, MenuOutlined } from "@mui/icons-material";
|
||||
import { IconButton } from "@mui/material";
|
||||
|
||||
import {
|
||||
toggleSamplesDrawerOpen,
|
||||
useSamplesDrawerOpen
|
||||
} from "../../documents/editor/EditorContext";
|
||||
|
||||
function useIcon() {
|
||||
const samplesDrawerOpen = useSamplesDrawerOpen();
|
||||
if (samplesDrawerOpen) {
|
||||
return <FirstPageOutlined fontSize="small" />;
|
||||
}
|
||||
return <MenuOutlined fontSize="small" />;
|
||||
}
|
||||
|
||||
export default function ToggleSamplesPanelButton() {
|
||||
const icon = useIcon();
|
||||
return <IconButton onClick={toggleSamplesDrawerOpen}>{icon}</IconButton>;
|
||||
}
|
||||
Reference in New Issue
Block a user