mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-02-04 07:05:00 -05:00
* feat: 💄 updated icons + minor ui tweaks * revert: 💄 removes ui tweaks * revert: 💄 removed more ui tweaks removed more ui tweaks and a commented-out icon import * style: 🚨 satisfy the linter --------- Co-authored-by: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
31 lines
798 B
TypeScript
31 lines
798 B
TypeScript
import { usePauseProcessor } from 'features/queue/hooks/usePauseProcessor';
|
|
import { memo } from 'react';
|
|
import { useTranslation } from 'react-i18next';
|
|
import { PiPauseFill } from 'react-icons/pi';
|
|
|
|
import QueueButton from './common/QueueButton';
|
|
|
|
type Props = {
|
|
asIconButton?: boolean;
|
|
};
|
|
|
|
const PauseProcessorButton = ({ asIconButton }: Props) => {
|
|
const { t } = useTranslation();
|
|
const { pauseProcessor, isLoading, isDisabled } = usePauseProcessor();
|
|
|
|
return (
|
|
<QueueButton
|
|
asIconButton={asIconButton}
|
|
label={t('queue.pause')}
|
|
tooltip={t('queue.pauseTooltip')}
|
|
isDisabled={isDisabled}
|
|
isLoading={isLoading}
|
|
icon={<PiPauseFill />}
|
|
onClick={pauseProcessor}
|
|
colorScheme="gold"
|
|
/>
|
|
);
|
|
};
|
|
|
|
export default memo(PauseProcessorButton);
|