mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
26 lines
703 B
TypeScript
26 lines
703 B
TypeScript
|
import { InvIconButton } from 'common/components/InvIconButton/InvIconButton';
|
||
|
import { InvTooltip } from 'common/components/InvTooltip/InvTooltip';
|
||
|
import { useTranslation } from 'react-i18next';
|
||
|
import { FaCode } from 'react-icons/fa';
|
||
|
|
||
|
type Props = {
|
||
|
isOpen: boolean;
|
||
|
onOpen: () => void;
|
||
|
};
|
||
|
|
||
|
export const AddEmbeddingButton = (props: Props) => {
|
||
|
const { onOpen, isOpen } = props;
|
||
|
const { t } = useTranslation();
|
||
|
return (
|
||
|
<InvTooltip label={t('embedding.addEmbedding')}>
|
||
|
<InvIconButton
|
||
|
variant="promptOverlay"
|
||
|
isDisabled={isOpen}
|
||
|
aria-label={t('embedding.addEmbedding')}
|
||
|
icon={<FaCode />}
|
||
|
onClick={onOpen}
|
||
|
/>
|
||
|
</InvTooltip>
|
||
|
);
|
||
|
};
|