mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
lint fix
This commit is contained in:
committed by
psychedelicious
parent
0a4cbc4e16
commit
4f95c077d4
@ -4,9 +4,8 @@ import { Collapse, Icon, useDisclosure } from '@chakra-ui/react';
|
||||
import type { InvExpanderProps } from 'common/components/InvExpander/types';
|
||||
import { InvText } from 'common/components/InvText/wrapper';
|
||||
import { t } from 'i18next';
|
||||
import { BiCollapseVertical, BiExpandVertical } from 'react-icons/bi';
|
||||
import { useAppDispatch } from '../../../app/store/storeHooks';
|
||||
import { useCallback } from 'react';
|
||||
import { BiCollapseVertical, BiExpandVertical } from 'react-icons/bi';
|
||||
|
||||
const buttonStyles: SystemStyleObject = {
|
||||
color: 'base.400',
|
||||
|
@ -1,8 +1,7 @@
|
||||
import { ThunkAction } from '@reduxjs/toolkit';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
export type InvExpanderProps = PropsWithChildren<{
|
||||
label?: string;
|
||||
defaultIsOpen?: boolean;
|
||||
onClick?: (isOpen: boolean) => void
|
||||
onClick?: (isOpen: boolean) => void;
|
||||
}>;
|
||||
|
@ -13,7 +13,7 @@ export const InvSingleAccordion = memo((props: InvSingleAccordionProps) => {
|
||||
(isExpanded: boolean) => {
|
||||
props.onClick && props.onClick(isExpanded);
|
||||
},
|
||||
[props.onClick]
|
||||
[props]
|
||||
);
|
||||
|
||||
return (
|
||||
@ -26,7 +26,7 @@ export const InvSingleAccordion = memo((props: InvSingleAccordionProps) => {
|
||||
<>
|
||||
<InvAccordionButton
|
||||
badges={props.badges}
|
||||
onClick={() => handleAccordionClick(isExpanded)}
|
||||
onClick={handleAccordionClick.bind(null, isExpanded)}
|
||||
>
|
||||
{props.label}
|
||||
</InvAccordionButton>
|
||||
|
@ -4,5 +4,5 @@ export type InvSingleAccordionProps = PropsWithChildren<{
|
||||
label: string;
|
||||
badges?: (string | number)[];
|
||||
defaultIsOpen?: boolean;
|
||||
onClick?: (isOpen?: boolean) => void
|
||||
onClick?: (isOpen?: boolean) => void;
|
||||
}>;
|
||||
|
Reference in New Issue
Block a user