feat(ui): restore reset button for init image

This commit is contained in:
psychedelicious 2023-06-09 14:00:23 +10:00
parent 07c49a5726
commit fd03c7eebe
2 changed files with 3 additions and 3 deletions

View File

@ -14,7 +14,7 @@ import ImageMetadataOverlay from 'common/components/ImageMetadataOverlay';
import { AnimatePresence } from 'framer-motion'; import { AnimatePresence } from 'framer-motion';
import { ReactElement, SyntheticEvent, useCallback } from 'react'; import { ReactElement, SyntheticEvent, useCallback } from 'react';
import { memo, useRef } from 'react'; import { memo, useRef } from 'react';
import { FaImage, FaTimes, FaUpload } from 'react-icons/fa'; import { FaImage, FaTimes, FaUndo, FaUpload } from 'react-icons/fa';
import { ImageDTO } from 'services/api'; import { ImageDTO } from 'services/api';
import { v4 as uuidv4 } from 'uuid'; import { v4 as uuidv4 } from 'uuid';
import IAIDropOverlay from './IAIDropOverlay'; import IAIDropOverlay from './IAIDropOverlay';
@ -174,14 +174,13 @@ const IAIDndImage = (props: IAIDndImageProps) => {
position: 'absolute', position: 'absolute',
top: 0, top: 0,
right: 0, right: 0,
p: 2,
}} }}
> >
<IAIIconButton <IAIIconButton
size={resetIconSize} size={resetIconSize}
tooltip="Reset Image" tooltip="Reset Image"
aria-label="Reset Image" aria-label="Reset Image"
icon={<FaTimes />} icon={<FaUndo />}
onClick={onReset} onClick={onReset}
/> />
</Box> </Box>

View File

@ -58,6 +58,7 @@ const InitialImagePreview = () => {
onReset={handleReset} onReset={handleReset}
fallback={<IAIImageFallback sx={{ bg: 'none' }} />} fallback={<IAIImageFallback sx={{ bg: 'none' }} />}
postUploadAction={{ type: 'SET_INITIAL_IMAGE' }} postUploadAction={{ type: 'SET_INITIAL_IMAGE' }}
withResetIcon
/> />
</Flex> </Flex>
); );