feat(ui): remove chakra as direct dependency

Moved a number of things to `@invoke-ai/ui` to support this.

Unfortunately, the bundle size has increased a bit. I will work on that later.
This commit is contained in:
psychedelicious
2024-01-23 22:56:11 +11:00
committed by Kent Keirsey
parent 1178fd8bd3
commit 52b24e01e2
14 changed files with 730 additions and 118 deletions

View File

@@ -1,9 +1,9 @@
import { ChevronUpIcon } from '@chakra-ui/icons';
import {
Box,
Flex,
FormControl,
FormLabel,
Icon,
IconButton,
Switch,
} from '@invoke-ai/ui';
@@ -19,7 +19,7 @@ import { activeTabNameSelector } from 'features/ui/store/uiSelectors';
import type { ChangeEvent } from 'react';
import { memo, useCallback } from 'react';
import { useTranslation } from 'react-i18next';
import { PiCopyBold, PiTrashSimpleBold } from 'react-icons/pi';
import { PiCaretUpBold, PiCopyBold, PiTrashSimpleBold } from 'react-icons/pi';
import { useToggle } from 'react-use';
import ControlAdapterImagePreview from './ControlAdapterImagePreview';
@@ -130,8 +130,9 @@ const ControlAdapterConfig = (props: { id: string; number: number }) => {
onClick={toggleIsExpanded}
variant="ghost"
icon={
<ChevronUpIcon
boxSize={6}
<Icon
boxSize={4}
as={PiCaretUpBold}
transform={isExpanded ? 'rotate(0deg)' : 'rotate(180deg)'}
transitionProperty="common"
transitionDuration="normal"