From 0c90f84bee4eec46d87c838f52ff6132fb4b30bb Mon Sep 17 00:00:00 2001 From: Tony Vi Date: Mon, 14 Aug 2023 22:00:56 +0300 Subject: [PATCH] fix(Table): set children prop type --- src/components/Table.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/Table.tsx b/src/components/Table.tsx index 3691e7b7..13423b5f 100644 --- a/src/components/Table.tsx +++ b/src/components/Table.tsx @@ -19,8 +19,7 @@ interface JustifyProps { justify: 'start' | 'center' | 'end' | 'between' | 'around' | 'baseline'; } -export type TableCellProps = Partial & - ( +export type TableCellProps = Partial & { children?: React.ReactNode } & ( | { /** Size of column width in range from `1` to `12` */ col: number; @@ -49,6 +48,7 @@ export type TableCellProps = Partial & export interface TableProps extends GapProps { /** Container width */ width?: number; + children?: React.ReactNode; } export type TableRowProps = GapProps & @@ -57,6 +57,7 @@ export type TableRowProps = GapProps & interactive?: boolean; /** Prop that mark current row as focused, ex. for keyboard navigation */ focused?: boolean; + children?: React.ReactNode; }; const mapRuleSet: { [key in AlignProps['align'] | JustifyProps['justify']]: string } = {