Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/feat/table-component' into feat/…
Browse files Browse the repository at this point in the history
…table-component-documentation
  • Loading branch information
chaitanyadeorukhkar committed Nov 23, 2023
2 parents 747d2c1 + d86e4fb commit 177be30
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/blade/src/components/Table/Table.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,15 @@ import { getStyledProps } from '~components/Box/styledProps';
import type { StyledPropsBlade } from '~components/Box/styledProps';
import { MetaConstants, metaAttribute } from '~utils/metaAttribute';

export type TableNode<Item> = Item & {
type TableNode<Item> = Item & {
id: Identifier;
};

export type TableData<Item> = {
type TableData<Item> = {
nodes: TableNode<Item>[];
};

export type TableProps<Item> = {
type TableProps<Item> = {
/**
* The children of the Table component should be a function that returns TableHeader, TableBody and TableFooter components.
* The function will be called with the tableData prop.
Expand Down Expand Up @@ -573,3 +573,4 @@ const Table = <Item,>({
};

export { Table };
export type { TableProps, TableNode };
1 change: 1 addition & 0 deletions packages/blade/src/components/Table/TableBody.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,4 @@ const TableRow = <Item,>({
};

export { TableBody, TableRow, TableCell };
export type { TableBodyProps, TableRowProps, TableCellProps };
1 change: 1 addition & 0 deletions packages/blade/src/components/Table/TableFooter.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,4 @@ const TableFooterCell = ({ children }: TableFooterCellProps): React.ReactElement
};

export { TableFooter, TableFooterRow, TableFooterCell };
export type { TableFooterProps, TableFooterRowProps, TableFooterCellProps };
3 changes: 2 additions & 1 deletion packages/blade/src/components/Table/TableHeader.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ const TableHeader = assignWithoutSideEffects(_TableHeader, {
componentId: ComponentIds.TableHeader,
});

export type TableHeaderCellProps = {
type TableHeaderCellProps = {
/**
* The children of TableHeaderCell can be a string or a ReactNode.
**/
Expand Down Expand Up @@ -233,3 +233,4 @@ const TableHeaderRow = assignWithoutSideEffects(_TableHeaderRow, {
});

export { TableHeader, TableHeaderRow, TableHeaderCell, TableHeaderCellCheckbox };
export type { TableHeaderProps, TableHeaderRowProps, TableHeaderCellProps };
1 change: 1 addition & 0 deletions packages/blade/src/components/Table/TableToolbar.web.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,3 +139,4 @@ const TableToolbar = assignWithoutSideEffects(_TableToolbar, {
});

export { TableToolbar, TableToolbarActions };
export type { TableToolbarProps, TableToolbarActionsProps };

0 comments on commit 177be30

Please sign in to comment.