doc: updated table components props

This commit is contained in:
Asad Karimov 2025-03-10 14:58:37 -04:00
parent 363f1fe39d
commit eb8f3dfa85

@ -482,11 +482,11 @@ export default ExampleFive;
| **width** | number | Cell width in pixels | `null` |
| **height** | number | Cell height in pixels | `null` |
| **flex** | number | Flex value for the cell | `1` (if no width, height, or style) |
| **style** | Style | Container style | `null` |
| **textStyle** | Style | Text style for cell content | `null` |
| **borderStyle** | Object | Cell border line width and color | `{ borderWidth: 0, borderColor: '#000' }` |
| **cellContainerProps** | ViewProps | Props passed to the cell container | `{}` |
| **onPress** | Function | Callback when cell is pressed | `null` |
| **style** | StyleProp<ViewStyle> | Container style | `null` |
| **textStyle** | StyleProp<TextStyle> | Text style for cell content | `null` |
| **borderStyle** | BorderStyle | Cell border line width and color | `{ borderWidth: 0, borderColor: '#000' }` |
| **cellContainer** | ViewProps | Props passed to the cell container | `{}` |
| **onPress** | (data: any) => void | Callback when cell is pressed | `null` |
| **children** | ReactNode | Children to render inside the cell | `null` |
### `Row` Component Properties
@ -494,50 +494,51 @@ export default ExampleFive;
| Prop | Type | Description | Default |
|---|---|---|---|
| **data** | Array<string \| number \| null> | Array of data items for each cell in the row | Required |
| **style** | Style | Container style | `null` |
| **style** | StyleProp<ViewStyle> | Container style | `null` |
| **widthArr** | number[] | Array of widths for each cell | `[]` |
| **height** | number | Height for the entire row | `null` |
| **flexArr** | number[] | Array of flex values for each cell in the row | `[]` |
| **textStyle** | Style | Text style applied to all cells in the row | `null` |
| **borderStyle** | Object | Border line width and color | `{ borderWidth: 0, borderColor: '#000' }` |
| **cellTextStyle** | Function | Function to generate custom text styles for individual cells | `null` |
| **onPress** | Function | Callback when a cell is pressed | `null` |
| **textStyle** | StyleProp<TextStyle> | Text style applied to all cells in the row | `null` |
| **borderStyle** | BorderStyle | Border line width and color | `{ borderWidth: 0, borderColor: '#000' }` |
| **cellTextStyle** | (item: any) => StyleProp<TextStyle> | Function to generate custom text styles for individual cells | `null` |
| **onPress** | (item: any) => void | Callback when a cell is pressed | `null` |
### `Rows` Component Properties
| Prop | Type | Description | Default |
|---|---|---|---|
| **data** | Array<Array<string \| number \| null>> | 2D array of data for rows and cells | Required |
| **style** | Style | Container style | `null` |
| **style** | StyleProp<ViewStyle> | Container style | `null` |
| **widthArr** | number[] | Array of widths for each column | `[]` |
| **heightArr** | number[] | Array of heights for each row | `[]` |
| **flexArr** | number[] | Array of flex values for each column | `[]` |
| **textStyle** | Style | Text style applied to all cells | `null` |
| **textStyle** | StyleProp<TextStyle> | Text style applied to all cells | `null` |
| **borderStyle** | Object | Border line width and color | `{ borderWidth: 0, borderColor: '#000' }` |
| **onPress** | Function | Callback when a cell is pressed | `null` |
| **cellTextStyle** | (item: any) => StyleProp<TextStyle> | Function to generate custom text styles for individual cells | `null` |
| **onPress** | (item: any) => void | Callback when a cell is pressed | `null` |
### `Col` Component Properties
| Prop | Type | Description | Default |
|---|---|---|---|
| **data** | Array<string \| number \| null> | Array of data items for each cell in the column | Required |
| **style** | Style | Container style | `null` |
| **style** | StyleProp<ViewStyle> | Container style | `null` |
| **width** | number | Width for the entire column | `null` |
| **heightArr** | number[] | Array of heights for each cell | `[]` |
| **flex** | number | Flex value for the column | `null` |
| **textStyle** | Style | Text style applied to all cells in the column | `null` |
| **borderStyle** | Object | Border line width and color | `{ borderWidth: 0, borderColor: '#000' }` |
| **textStyle** | StyleProp<TextStyle> | Text style applied to all cells in the column | `null` |
| **borderStyle** | BorderStyle | Border line width and color | `{ borderWidth: 0, borderColor: '#000' }` |
### `Cols` Component Properties
| Prop | Type | Description | Default |
|---|---|---|---|
| **data** | Array<Array<string \| number \| null>> | 2D array of data for columns and cells | Required |
| **style** | Style | Container style | `null` |
| **style** | StyleProp<ViewStyle> | Container style | `null` |
| **widthArr** | number[] | Array of widths for each column | `[]` |
| **heightArr** | number[] | Array of heights for each cell in a column | `[]` |
| **flexArr** | number[] | Array of flex values for each column | `[]` |
| **textStyle** | Style | Text style applied to all cells | `null` |
| **textStyle** | StyleProp<TextStyle> | Text style applied to all cells | `null` |
| **borderStyle** | Object | Border line width and color | `{ borderWidth: 0, borderColor: '#000' }` |
### `StickyTable` Component Properties
@ -547,12 +548,12 @@ export default ExampleFive;
| **data** | Array<Array<string \| number \| null>> | Full table data including first column | Required |
| **stickyColumnWidth** | number | Width of the sticky column | Required |
| **columnWidths** | number[] | Widths for non-sticky columns | `[]` |
| **style** | Style | Style for the container | `null` |
| **cellStyle** | Style | Style for cells | `null` |
| **textStyle** | Style | Text style for cell content | `null` |
| **headerStyle** | Style | Style for header row | `null` |
| **headerTextStyle** | Style | Text style for header cells | `null` |
| **borderStyle** | Object | Border style | `{ borderWidth: 1, borderColor: '#000' }` |
| **style** | StyleProp<ViewStyle> | Style for the container | `null` |
| **cellStyle** | StyleProp<ViewStyle> | Style for cells | `null` |
| **textStyle** | StyleProp<TextStyle> | Text style for cell content | `null` |
| **headerStyle** | StyleProp<ViewStyle> | Style for header row | `null` |
| **headerTextStyle** | StyleProp<TextStyle> | Text style for header cells | `null` |
| **borderStyle** | BorderStyle | Border style | `{ borderWidth: 1, borderColor: '#000' }` |
---