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.

826 B
Raw Blame
import { IconButton, Tooltip } from '@invoke-ai/ui-library';
import { useSelectTool, useToolIsSelected } from 'features/controlLayers/components/Tool/hooks';
import { memo } from 'react';
import { useTranslation } from 'react-i18next';
import { PiTextTBold } from 'react-icons/pi';

export const ToolTextButton = memo(() => {
  const { t } = useTranslation();
  const isSelected = useToolIsSelected('text');
  const selectText = useSelectTool('text');

  return (
    <Tooltip label={`${t('controlLayers.tool.text')}`} placement="end">
      <IconButton
        aria-label={t('controlLayers.tool.text')}
        icon={<PiTextTBold />}
        colorScheme={isSelected ? 'invokeBlue' : 'base'}
        variant="solid"
        onClick={selectText}
      />
    </Tooltip>
  );
});

ToolTextButton.displayName = 'ToolTextButton';