Skip to content

Commit

Permalink
Update name for better consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Dow committed Dec 14, 2023
1 parent db87259 commit f6556cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/components/Table/TableStyles.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export interface GridStyle {
/** Applied on hover if a row has a rowLink/onClick set. */
rowHoverColor?: Palette | "none";
/** Applied on hover of a row */
rowHoverCss?: Properties;
nonHeaderRowHoverCss?: Properties;
/** Default content to put into an empty cell */
emptyCell?: ReactNode;
presentationSettings?: Pick<PresentationFieldProps, "borderless" | "typeScale"> &
Expand Down Expand Up @@ -222,7 +222,7 @@ export const cardStyle: GridStyle = {
...Css.p1.m0.xsMd.gray700.$,
},
rowHoverColor: "none",
rowHoverCss: Css.bshHover.bGray700.$,
nonHeaderRowHoverCss: Css.bshHover.bGray700.$,
};

export function resolveStyles(style: GridStyle | GridStyleDef): GridStyle {
Expand Down
4 changes: 2 additions & 2 deletions src/components/Table/components/Row.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ function RowImpl<R extends Kinded, S>(props: RowProps<R>): ReactElement {
"&:hover > *": Css.bgColor(style.rowHoverColor ?? Palette.Blue100).$,
}),
...(!reservedRowKinds.includes(row.kind) &&
style.rowHoverCss && {
style.nonHeaderRowHoverCss && {
// Need to spread this to make TS happy.
":hover": { ...style.rowHoverCss },
":hover": { ...style.nonHeaderRowHoverCss },
}),
// For virtual tables use `display: flex` to keep all cells on the same row. For each cell in the row use `flexNone` to ensure they stay their defined widths
...(as === "table" ? {} : Css.relative.df.fg1.fs1.addIn("&>*", Css.flexNone.$).$),
Expand Down

0 comments on commit f6556cf

Please sign in to comment.