react-native-accordion-wrapper
Version:
A handy wrapper of accordion behavior for react native components
23 lines (22 loc) • 905 B
TypeScript
import React from 'react';
import { TextStyle, ViewStyle } from 'react-native';
declare type DataSourceItem = {
title: string;
child?: React.ReactNode;
nonExpandable?: boolean;
onPress?: () => void;
};
export declare type AccordionProps = {
useFlatList?: boolean;
dataSource: DataSourceItem[];
headerItemsStyle?: ViewStyle;
itemWrapperStyle?: ViewStyle;
childrenWrapperStyle?: ViewStyle;
rightChevronIcon?: JSX.Element;
initialActiveIndex?: number;
headerTitleLabelStyle?: TextStyle;
shouldSelectOneItemAtATime?: boolean;
listHeaderComponent?: React.ReactElement;
};
declare const Accordion: ({ dataSource, useFlatList, rightChevronIcon, itemWrapperStyle, headerItemsStyle, initialActiveIndex, childrenWrapperStyle, listHeaderComponent, headerTitleLabelStyle, shouldSelectOneItemAtATime, }: AccordionProps) => JSX.Element;
export default Accordion;