import React from 'react'; import type { ReactElement } from 'react'; import type { StyleProp, ViewStyle } from 'react-native'; import { StyledCollapse, StyledHeaderWrapper, StyledItemWrapper, } from './StyledAccordion'; import Typography from '../Typography'; import Icon from '../Icon'; import type { Variant } from './StyledAccordion'; type AccordionItemProps = { header: string | ReactElement; content: ReactElement; open?: boolean; onPress?: () => void; variant?: Variant; style?: StyleProp; testID?: string; }; const AccordionItem = ({ header, content, open = false, onPress, variant = 'default', style, testID, }: AccordionItemProps) => ( {typeof header === 'string' ? ( {header} ) : ( header )} {content} ); export default AccordionItem;