Skip to content

Commit

Permalink
fix(Table): combine TableRow props into single type def
Browse files Browse the repository at this point in the history
  • Loading branch information
LamaEats committed Aug 3, 2023
1 parent ae8e9bd commit 57b9c6b
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions src/components/Table.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,19 +51,12 @@ export interface TableProps extends GapProps {
}

export type TableRowProps = GapProps &
Partial<AlignProps & JustifyProps> &
(
| {
interactive?: false | never;
focused?: never;
}
| {
/** Apply interactive styles: hover */
interactive: true;
/** Prop that mark current row as focused, ex. for keyboard navigation */
focused: boolean;
}
);
Partial<AlignProps & JustifyProps> & {
/** Apply interactive styles: hover */
interactive?: boolean;
/** Prop that mark current row as focused, ex. for keyboard navigation */
focused?: boolean;
};

const mapRuleSet: { [key in AlignProps['align'] | JustifyProps['justify']]: string } = {
baseline: 'baseline',
Expand Down

0 comments on commit 57b9c6b

Please sign in to comment.