mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-15 13:43:39 +01:00
17 lines
502 B
TypeScript
17 lines
502 B
TypeScript
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={sidebarDisplay.hidden ? 'leftPanelHidden' : 'leftPanelVisible'}
|
|
/>
|
|
);
|
|
});
|