Skip to content

Invoke is a leading creative engine that uses image and video generation models to empower professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry-leading application interface, and serves as the foundation for multiple commercial products.

823 B
Raw Blame
import { IconButton } from '@invoke-ai/ui-library';
import { $stylePresetModalState } from 'features/stylePresets/store/stylePresetModal';
import { useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { PiPlusBold } from 'react-icons/pi';

export const StylePresetCreateButton = () => {
  const handleClickAddNew = useCallback(() => {
    $stylePresetModalState.set({
      prefilledFormData: null,
      updatingStylePresetId: null,
      isModalOpen: true,
    });
  }, []);

  const { t } = useTranslation();

  return (
    <IconButton
      size="sm"
      variant="link"
      alignSelf="stretch"
      icon={<PiPlusBold />}
      tooltip={t('stylePresets.createPromptTemplate')}
      aria-label={t('stylePresets.createPromptTemplate')}
      onClick={handleClickAddNew}
    />
  );
};