@prosperitainova/dumbo-react-native
Version:
Dumbo for React Native Library
39 lines • 1.77 kB
TypeScript
import React from 'react';
import { StyleProp, ViewStyle, GestureResponderEvent, ViewProps } from 'react-native';
import { TextBreakModes } from '../Text';
/** Props for DataTableCell component */
export type DataTableCellProps = {
/** Content of the cell. If string will format accordingly. If Node will not be styled. */
content: React.ReactNode | string;
/** Type of cell (default is default) */
type?: 'default' | 'header';
/** Width to set. Be sure to set width of header and corresponding cell to same. Defaults to fill. */
width?: number;
/** Break mode used on string type content (default is tail) */
breakMode?: TextBreakModes;
/** onPress event for the cell */
onPress?: (event: GestureResponderEvent) => void;
/** onLongPress event for the cell */
onLongPress?: (event: GestureResponderEvent) => void;
/** Style to set on the item */
style?: StyleProp<ViewStyle>;
/** Text to use for cell (accessibility). Not set by default. May not be required if cell only includes text */
cellText?: string;
/** No padding on the cell */
noPadding?: boolean;
/** Direct props to set on the React Native component (including iOS and Android specific props). Most use cases should not need this. */
componentProps?: ViewProps;
};
/**
* DataTableCell component for rendering a data table cell.
* Used as a child of DataTable
*
* {@link https://github.com/carbon-design-system/carbon-react-native/blob/main/example/src/Views/DataTable.tsx | Example code}
*/
export declare class DataTableCell extends React.Component<DataTableCellProps> {
private get styles();
private get content();
private getStateStyle;
render(): React.ReactNode;
}
//# sourceMappingURL=DataTableCell.d.ts.map