Skip to content

Commit 5c866e2

Browse files
authored
fix: hover group background color (#1783)
fix: hover group bg Signed-off-by: Adam Setch <[email protected]>
1 parent 64f362f commit 5c866e2

File tree

6 files changed

+15
-8
lines changed

6 files changed

+15
-8
lines changed

src/renderer/components/notifications/AccountNotifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const AccountNotifications: FC<IAccountNotifications> = (
103103
/>
104104
</Button>
105105

106-
<HoverGroup bgColor="bg-gitify-account-rest">
106+
<HoverGroup bgColor="group-hover:bg-gitify-account-rest">
107107
<HoverButton
108108
label="My Issues"
109109
icon={IssueOpenedIcon}

src/renderer/components/notifications/NotificationRow.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ export const NotificationRow: FC<INotificationRow> = ({
153153
</Stack>
154154

155155
{!animateExit && (
156-
<HoverGroup bgColor="bg-gitify-notification-hover">
156+
<HoverGroup bgColor="group-hover:bg-gitify-notification-hover">
157157
<HoverButton
158158
label="Mark as done"
159159
icon={CheckIcon}

src/renderer/components/notifications/RepositoryNotifications.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const RepositoryNotifications: FC<IRepositoryNotifications> = ({
9494
</Button>
9595

9696
{!animateExit && (
97-
<HoverGroup bgColor="bg-gitify-repository">
97+
<HoverGroup bgColor="group-hover:bg-gitify-repository">
9898
<HoverButton
9999
label="Mark repository as done"
100100
icon={CheckIcon}

src/renderer/components/primitives/HoverGroup.test.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,11 @@ import { HoverGroup } from './HoverGroup';
33

44
describe('renderer/components/primitives/HoverGroup.tsx', () => {
55
it('should render', () => {
6-
const tree = render(<HoverGroup bgColor="white">Hover Group</HoverGroup>);
6+
const tree = render(
7+
<HoverGroup bgColor="group-hover:bg-gitify-repository">
8+
Hover Group
9+
</HoverGroup>,
10+
);
711
expect(tree).toMatchSnapshot();
812
});
913
});

src/renderer/components/primitives/HoverGroup.tsx

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@ import { Stack } from '@primer/react';
44
import { cn } from '../../utils/cn';
55

66
interface IHoverGroup {
7-
bgColor: string;
87
children: ReactNode;
8+
bgColor:
9+
| 'group-hover:bg-gitify-account-rest'
10+
| 'group-hover:bg-gitify-repository'
11+
| 'group-hover:bg-gitify-notification-hover';
912
}
1013

1114
export const HoverGroup: FC<IHoverGroup> = ({
@@ -20,7 +23,7 @@ export const HoverGroup: FC<IHoverGroup> = ({
2023
className={cn(
2124
'absolute right-0 h-full',
2225
'opacity-0 transition-opacity group-hover:opacity-100',
23-
`group-hover:${bgColor}`,
26+
bgColor,
2427
)}
2528
>
2629
{children}

src/renderer/components/primitives/__snapshots__/HoverGroup.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)