mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
lint
This commit is contained in:
parent
415a1c7a4f
commit
c9ddbb4241
@ -1,13 +1,13 @@
|
|||||||
import { Divider, Flex } from '@chakra-ui/layout';
|
import { Divider, Flex } from '@chakra-ui/layout';
|
||||||
import type { SystemStyleObject } from '@chakra-ui/react';
|
import type { SystemStyleObject } from '@chakra-ui/react';
|
||||||
import { Collapse, Icon, useDisclosure } from '@chakra-ui/react';
|
import { Collapse, Icon, useDisclosure } from '@chakra-ui/react';
|
||||||
|
import { useAppDispatch } from 'app/store/storeHooks';
|
||||||
import type { InvExpanderProps } from 'common/components/InvExpander/types';
|
import type { InvExpanderProps } from 'common/components/InvExpander/types';
|
||||||
import { InvText } from 'common/components/InvText/wrapper';
|
import { InvText } from 'common/components/InvText/wrapper';
|
||||||
|
import { expanderToggled } from 'features/parameters/store/actions';
|
||||||
import { t } from 'i18next';
|
import { t } from 'i18next';
|
||||||
import { useCallback } from 'react';
|
import { useCallback } from 'react';
|
||||||
import { BiCollapseVertical, BiExpandVertical } from 'react-icons/bi';
|
import { BiCollapseVertical, BiExpandVertical } from 'react-icons/bi';
|
||||||
import { useAppDispatch } from '../../../app/store/storeHooks';
|
|
||||||
import { expanderToggled } from '../../../features/parameters/store/actions';
|
|
||||||
|
|
||||||
const buttonStyles: SystemStyleObject = {
|
const buttonStyles: SystemStyleObject = {
|
||||||
color: 'base.400',
|
color: 'base.400',
|
||||||
|
@ -3,6 +3,5 @@ import type { PropsWithChildren } from 'react';
|
|||||||
export type InvExpanderProps = PropsWithChildren<{
|
export type InvExpanderProps = PropsWithChildren<{
|
||||||
label?: string;
|
label?: string;
|
||||||
defaultIsOpen?: boolean;
|
defaultIsOpen?: boolean;
|
||||||
onClick?: (isOpen: boolean) => void;
|
|
||||||
id?: string;
|
id?: string;
|
||||||
}>;
|
}>;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
|
import { useAppDispatch } from 'app/store/storeHooks';
|
||||||
import { InvAccordionButton } from 'common/components/InvAccordion/InvAccordionButton';
|
import { InvAccordionButton } from 'common/components/InvAccordion/InvAccordionButton';
|
||||||
import {
|
import {
|
||||||
InvAccordion,
|
InvAccordion,
|
||||||
InvAccordionItem,
|
InvAccordionItem,
|
||||||
InvAccordionPanel,
|
InvAccordionPanel,
|
||||||
} from 'common/components/InvAccordion/wrapper';
|
} from 'common/components/InvAccordion/wrapper';
|
||||||
|
import { singleAccordionExpanded } from 'features/parameters/store/actions';
|
||||||
import { memo, useCallback } from 'react';
|
import { memo, useCallback } from 'react';
|
||||||
|
|
||||||
import type { InvSingleAccordionProps } from './types';
|
import type { InvSingleAccordionProps } from './types';
|
||||||
import { singleAccordionExpanded } from '../../../features/parameters/store/actions';
|
|
||||||
import { useAppDispatch } from '../../../app/store/storeHooks';
|
|
||||||
|
|
||||||
export const InvSingleAccordion = memo((props: InvSingleAccordionProps) => {
|
export const InvSingleAccordion = memo((props: InvSingleAccordionProps) => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
@ -18,7 +18,7 @@ export const InvSingleAccordion = memo((props: InvSingleAccordionProps) => {
|
|||||||
dispatch(singleAccordionExpanded({ id: props.id, isOpen }));
|
dispatch(singleAccordionExpanded({ id: props.id, isOpen }));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[props]
|
[props, dispatch]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
@ -9,10 +9,10 @@ export const modelSelected = createAction<MainModelField>(
|
|||||||
'generation/modelSelected'
|
'generation/modelSelected'
|
||||||
);
|
);
|
||||||
|
|
||||||
export const expanderToggled = createAction<{ id: string, isOpen: boolean }>(
|
export const expanderToggled = createAction<{ id: string; isOpen: boolean }>(
|
||||||
'parameters/expanderToggled'
|
'parameters/expanderToggled'
|
||||||
);
|
);
|
||||||
export const singleAccordionExpanded = createAction<{ id: string, isOpen: boolean }>(
|
export const singleAccordionExpanded = createAction<{
|
||||||
'parameters/singleAccordionExpanded'
|
id: string;
|
||||||
);
|
isOpen: boolean;
|
||||||
|
}>('parameters/singleAccordionExpanded');
|
||||||
|
Loading…
Reference in New Issue
Block a user