mirror of
https://github.com/zhigang1992/react-native-paper.git
synced 2026-06-16 20:01:13 +08:00
* feat: add ListSubheader component * feat: update ListSection in order to use ListSubheader The `title` property is set as deprecated. * test: update ListSection tests * docs: update ListSection example * feat: add ListSubheader typings * docs: add ListSubheader usage example * test: update snapshot * refactor: remove warning * fix: revert styles
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import * as React from 'react';
|
|
import { StyleProp, ViewStyle, ViewProps, TextProps, TextStyle } from 'react-native';
|
|
import { ThemeShape, IconSource } from '../types';
|
|
import { TouchableRipplePropsWithoutChildren } from './TouchableRipple';
|
|
|
|
export interface AccordionProps {
|
|
children: React.ReactNode;
|
|
title: React.ReactNode;
|
|
description?: React.ReactNode;
|
|
expanded?: boolean;
|
|
onPress?: () => any;
|
|
left?: (props: { color: string }) => React.ReactNode;
|
|
style?: StyleProp<ViewStyle>;
|
|
theme?: ThemeShape;
|
|
}
|
|
|
|
export declare class Accordion extends React.Component<AccordionProps> {}
|
|
|
|
export interface IconProps {
|
|
icon: IconSource;
|
|
color: string;
|
|
style?: StyleProp<ViewStyle>;
|
|
}
|
|
|
|
export declare class Icon extends React.Component<IconProps> {}
|
|
|
|
export interface ItemProps extends TouchableRipplePropsWithoutChildren {
|
|
title: React.ReactNode;
|
|
description?: React.ReactNode;
|
|
left?: (props: { color: string }) => React.ReactNode;
|
|
right?: (props: { color: string }) => React.ReactNode;
|
|
}
|
|
|
|
export declare class Item extends React.Component<ItemProps> {}
|
|
|
|
export interface SectionProps extends ViewProps {
|
|
children: React.ReactNode;
|
|
title?: string;
|
|
theme?: ThemeShape;
|
|
}
|
|
|
|
export declare class Section extends React.Component<SectionProps> {}
|
|
|
|
export interface SubheaderProps extends TextProps {
|
|
style?: StyleProp<TextStyle>;
|
|
theme?: ThemeShape
|
|
}
|
|
|
|
export declare class Subheader extends React.Component<SubheaderProps> {}
|