mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
27 lines
703 B
TypeScript
27 lines
703 B
TypeScript
import { MdPhotoLibrary } from 'react-icons/md';
|
|
import { useAppDispatch } from '../../app/store';
|
|
import IAIIconButton from '../../common/components/IAIIconButton';
|
|
import { setShouldShowGallery } from '../gallery/gallerySlice';
|
|
|
|
const ShowHideGalleryButton = () => {
|
|
const dispatch = useAppDispatch();
|
|
|
|
const handleShowGallery = () => {
|
|
dispatch(setShouldShowGallery(true));
|
|
};
|
|
|
|
return (
|
|
<IAIIconButton
|
|
tooltip="Show Gallery (G)"
|
|
tooltipPlacement="top"
|
|
aria-label="Show Gallery"
|
|
styleClass="floating-show-hide-button right"
|
|
onMouseOver={handleShowGallery}
|
|
>
|
|
<MdPhotoLibrary />
|
|
</IAIIconButton>
|
|
);
|
|
};
|
|
|
|
export default ShowHideGalleryButton;
|