react-native-paper
Version:
Material design for React Native
50 lines • 1.34 kB
TypeScript
import * as React from 'react';
import { StyleProp, TextStyle, View, ViewStyle } from 'react-native';
import type { ThemeProp } from '../../types';
export type Props = React.ComponentPropsWithRef<typeof View> & {
/**
* Title text for the section.
*/
title?: string;
/**
* Content of the section.
*/
children: React.ReactNode;
/**
* @optional
*/
theme?: ThemeProp;
/**
* Style that is passed to Title element.
*/
titleStyle?: StyleProp<TextStyle>;
style?: StyleProp<ViewStyle>;
};
/**
* A component used to group list items.
*
* ## Usage
* ```js
* import * as React from 'react';
* import { List, MD3Colors } from 'react-native-paper';
*
* const MyComponent = () => (
* <List.Section>
* <List.Subheader>Some title</List.Subheader>
* <List.Item title="First Item" left={() => <List.Icon icon="folder" />} />
* <List.Item
* title="Second Item"
* left={() => <List.Icon color={MD3Colors.tertiary70} icon="folder" />}
* />
* </List.Section>
* );
*
* export default MyComponent;
* ```
*/
declare const ListSection: {
({ children, title, titleStyle, style, theme: themeOverrides, ...rest }: Props): React.JSX.Element;
displayName: string;
};
export default ListSection;
//# sourceMappingURL=ListSection.d.ts.map