refactor: something

This commit is contained in:
GyDi
2022-01-16 18:30:25 +08:00
parent 9ec7184aa1
commit 9c43b31fc0
10 changed files with 32 additions and 24 deletions

View File

@@ -0,0 +1,39 @@
import { Button } from "@mui/material";
import { appWindow } from "@tauri-apps/api/window";
import {
CloseRounded,
CropLandscapeOutlined,
HorizontalRuleRounded,
} from "@mui/icons-material";
const LayoutControl = () => {
return (
<>
<Button
size="small"
sx={{ minWidth: 48 }}
onClick={() => appWindow.minimize()}
>
<HorizontalRuleRounded />
</Button>
<Button
size="small"
sx={{ minWidth: 48 }}
onClick={() => appWindow.toggleMaximize()}
>
<CropLandscapeOutlined />
</Button>
<Button
size="small"
sx={{ minWidth: 48 }}
onClick={() => appWindow.hide()}
>
<CloseRounded />
</Button>
</>
);
};
export default LayoutControl;