Skip to content

Commit

Permalink
change reportActionItem hover color and card hover color
Browse files Browse the repository at this point in the history
  • Loading branch information
grgia committed Dec 14, 2023
1 parent 78ad3f9 commit 84f5d04
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/pages/home/report/ReportActionItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ function ReportActionItem(props) {
const isReportActionLinked = props.linkedReportActionID === props.action.reportActionID;

const highlightedBackgroundColorIfNeeded = useMemo(
() => (isReportActionLinked ? StyleUtils.getBackgroundColorStyle(theme.highlightBG) : {}),
[StyleUtils, isReportActionLinked, theme.highlightBG],
() => (isReportActionLinked ? StyleUtils.getBackgroundColorStyle(theme.rowHover) : {}),
[StyleUtils, isReportActionLinked, theme.rowHover],
);
const originalMessage = lodashGet(props.action, 'originalMessage', {});
const isDeletedParentAction = ReportActionsUtils.isDeletedParentAction(props.action);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/home/report/ReportActionItemSingle.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ function ReportActionItemSingle(props) {
icons={[icon, secondaryAvatar]}
isInReportAction
shouldShowTooltip
secondAvatarStyle={[StyleUtils.getBackgroundAndBorderStyle(theme.appBG), props.isHovered ? StyleUtils.getBackgroundAndBorderStyle(theme.highlightBG) : undefined]}
secondAvatarStyle={[StyleUtils.getBackgroundAndBorderStyle(theme.appBG), props.isHovered ? StyleUtils.getBackgroundAndBorderStyle(theme.rowHover) : undefined]}
/>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3706,8 +3706,8 @@ const styles = (theme: ThemeColors) =>
},

reportPreviewBoxHoverBorder: {
borderColor: theme.border,
backgroundColor: theme.border,
borderColor: theme.cardBG,
backgroundColor: theme.cardBG,
},

reportContainerBorderRadius: {
Expand Down
3 changes: 2 additions & 1 deletion src/styles/theme/themes/dark.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,14 @@ const darkTheme = {
transparent: colors.transparent,
signInPage: colors.green800,
darkSupportingText: colors.productDark800,
rowHover: colors.productDark300,

// Additional keys
overlay: colors.productDark400,
inverse: colors.productDark900,
shadow: colors.black,
componentBG: colors.productDark100,
hoverComponentBG: colors.productDark200,
hoverComponentBG: colors.productDark300,
activeComponentBG: colors.productDark400,
signInSidebar: colors.green800,
sidebar: colors.productDark200,
Expand Down
5 changes: 3 additions & 2 deletions src/styles/theme/themes/light.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const lightTheme = {
splashBG: colors.green400,
highlightBG: colors.productLight200,
border: colors.productLight400,
borderLighter: colors.productLight600,
borderLighter: colors.productLight400,
borderFocus: colors.green400,
icon: colors.productLight700,
iconMenu: colors.green400,
Expand All @@ -35,13 +35,14 @@ const lightTheme = {
transparent: colors.transparent,
signInPage: colors.green800,
darkSupportingText: colors.productDark800,
rowHover: colors.productLight300,

// Additional keys
overlay: colors.productLight400,
inverse: colors.productLight900,
shadow: colors.black,
componentBG: colors.productLight100,
hoverComponentBG: colors.productLight200,
hoverComponentBG: colors.productLight300,
activeComponentBG: colors.productLight400,
signInSidebar: colors.green800,
sidebar: colors.productLight200,
Expand Down
1 change: 1 addition & 0 deletions src/styles/theme/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type ThemeColors = {
transparent: Color;
signInPage: Color;
darkSupportingText: Color;
rowHover: Color;

// Additional keys
overlay: Color;
Expand Down
4 changes: 2 additions & 2 deletions src/styles/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,11 @@ function getHorizontalStackedAvatarBorderStyle({theme, isHovered, isPressed, isI
let borderColor = shouldUseCardBackground ? theme.cardBG : theme.appBG;

if (isHovered) {
borderColor = isInReportAction ? theme.highlightBG : theme.border;
borderColor = isInReportAction ? theme.rowHover : theme.border;
}

if (isPressed) {
borderColor = isInReportAction ? theme.highlightBG : theme.buttonPressedBG;
borderColor = isInReportAction ? theme.rowHover : theme.buttonPressedBG;
}

return {borderColor};
Expand Down

0 comments on commit 84f5d04

Please sign in to comment.