style: fix linter and add types

This commit is contained in:
Juan D. Jara
2021-09-27 02:35:10 +02:00
parent eea389879f
commit 54868fd486
4 changed files with 11 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ import { useState } from 'react';
import AnimateHeight from 'react-animate-height';
export interface AccordionProps {
children: (args: AccordionChildProps) => React.ReactElement<any, any> | null;
children: (args: AccordionChildProps) => React.ReactElement | null;
/** If true, only one accordion item can be open at any time */
single?: boolean;
/** If true, at least one accordion item will always be open */
@@ -13,7 +13,7 @@ export interface AccordionProps {
export interface AccordionChildProps {
openIndexes: number[];
handleClick(index: number): void;
AccordionContent: any;
AccordionContent: typeof AccordionContent;
}
export const AccordionContent: React.FC<{ isOpen: boolean }> = ({