Files
react-native-paper/typings/components/List.d.ts
Óscar Carretero e2b4ba4da7 feat: add ListSubheader component (#739)
* 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
2019-03-01 12:48:17 +02:00

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> {}