react-native-paper
Version:
Material design for React Native
78 lines (77 loc) • 2.26 kB
TypeScript
import * as React from 'react';
import { StyleProp, View, ViewStyle } from 'react-native';
declare type Props = React.ComponentPropsWithRef<typeof View> & {
/**
* Content of the `DataTableHeader`.
*/
children: React.ReactNode;
style?: StyleProp<ViewStyle>;
/**
* @optional
*/
theme: ReactNativePaper.Theme;
};
/**
* A component to display title in table header.
*
* <div class="screenshots">
* <figure>
* <img class="medium" src="screenshots/data-table-header.png" />
* </figure>
* </div>
*
*
* ## Usage
* ```js
* import * as React from 'react';
* import { DataTable } from 'react-native-paper';
*
* const MyComponent = () => (
* <DataTable>
* <DataTable.Header>
* <DataTable.Title
* sortDirection='descending'
* >
* Dessert
* </DataTable.Title>
* <DataTable.Title numeric>Calories</DataTable.Title>
* <DataTable.Title numeric>Fat (g)</DataTable.Title>
* </DataTable.Header>
* </DataTable>
* );
*
* export default MyComponent;
* ```
*/
declare const DataTableHeader: {
({ children, style, theme, ...rest }: Props): JSX.Element;
displayName: string;
};
declare const _default: React.ComponentType<Pick<import("react-native").ViewProps & React.RefAttributes<View> & {
/**
* Content of the `DataTableHeader`.
*/
children: React.ReactNode;
style?: StyleProp<ViewStyle>;
/**
* @optional
*/
theme: ReactNativePaper.Theme;
}, keyof import("react-native").ViewProps | keyof React.RefAttributes<View>> & {
theme?: import("@callstack/react-theme-provider").$DeepPartial<ReactNativePaper.Theme> | undefined;
}> & import("@callstack/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<import("react-native").ViewProps & React.RefAttributes<View> & {
/**
* Content of the `DataTableHeader`.
*/
children: React.ReactNode;
style?: StyleProp<ViewStyle>;
/**
* @optional
*/
theme: ReactNativePaper.Theme;
}> & {
({ children, style, theme, ...rest }: Props): JSX.Element;
displayName: string;
}, {}>;
export default _default;
export { DataTableHeader };