mirror of
https://gitee.com/ByteDance/flowgram.ai.git
synced 2025-07-07 17:43:29 +08:00
22 lines
553 B
TypeScript
22 lines
553 B
TypeScript
import { Tooltip, IconButton } from '@douyinfe/semi-ui';
|
|
|
|
import { UIIconGridRectangle } from './styles';
|
|
|
|
export const MinimapSwitch = (props: {
|
|
minimapVisible: boolean;
|
|
setMinimapVisible: (visible: boolean) => void;
|
|
}) => {
|
|
const { minimapVisible, setMinimapVisible } = props;
|
|
|
|
return (
|
|
<Tooltip content="Minimap">
|
|
<IconButton
|
|
type="tertiary"
|
|
theme="borderless"
|
|
icon={<UIIconGridRectangle visible={minimapVisible} />}
|
|
onClick={() => setMinimapVisible(!minimapVisible)}
|
|
/>
|
|
</Tooltip>
|
|
);
|
|
};
|