Skip to content

Commit

Permalink
fix(Table): set children prop type
Browse files Browse the repository at this point in the history
  • Loading branch information
awinogradov committed Aug 14, 2023
1 parent 4438fa9 commit 0c90f84
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ interface JustifyProps {
justify: 'start' | 'center' | 'end' | 'between' | 'around' | 'baseline';
}

export type TableCellProps = Partial<JustifyProps & AlignProps> &
(
export type TableCellProps = Partial<JustifyProps & AlignProps> & { children?: React.ReactNode } & (
| {
/** Size of column width in range from `1` to `12` */
col: number;
Expand Down Expand Up @@ -49,6 +48,7 @@ export type TableCellProps = Partial<JustifyProps & AlignProps> &
export interface TableProps extends GapProps {
/** Container width */
width?: number;
children?: React.ReactNode;
}

export type TableRowProps = GapProps &
Expand All @@ -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 } = {
Expand Down

0 comments on commit 0c90f84

Please sign in to comment.