mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-03-23 18:01:08 +01:00
Refactor and improve layout resizing
This commit is contained in:
16
src-web/components/SidebarDisplayToggle.tsx
Normal file
16
src-web/components/SidebarDisplayToggle.tsx
Normal file
@@ -0,0 +1,16 @@
|
||||
import { memo } from 'react';
|
||||
import { useSidebarDisplay } from '../hooks/useSidebarDisplay';
|
||||
import { IconButton } from './core/IconButton';
|
||||
|
||||
export const SidebarDisplayToggle = memo(function SidebarDisplayToggle() {
|
||||
const sidebarDisplay = useSidebarDisplay();
|
||||
return (
|
||||
<IconButton
|
||||
onClick={sidebarDisplay.toggle}
|
||||
className="pointer-events-auto"
|
||||
size="sm"
|
||||
title="Show sidebar"
|
||||
icon="hamburger"
|
||||
/>
|
||||
);
|
||||
});
|
||||
Reference in New Issue
Block a user