mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 20:40:15 +02:00
22 lines
647 B
TypeScript
22 lines
647 B
TypeScript
import { CiImageOff, CiImageOn } from 'react-icons/ci';
|
|
|
|
import { useShowImage, useToggleShowImage } from '/@/remote/store';
|
|
import { ActionIcon } from '/@/shared/components/action-icon/action-icon';
|
|
|
|
export const ImageButton = () => {
|
|
const showImage = useShowImage();
|
|
const toggleImage = useToggleShowImage();
|
|
|
|
return (
|
|
<ActionIcon
|
|
onClick={() => toggleImage()}
|
|
tooltip={{
|
|
label: showImage ? 'Hide Image' : 'Show Image',
|
|
}}
|
|
variant="default"
|
|
>
|
|
{showImage ? <CiImageOff size={30} /> : <CiImageOn size={30} />}
|
|
</ActionIcon>
|
|
);
|
|
};
|