Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const AccountNotifications: FC<IAccountNotifications> = (
/>
</Button>

<HoverGroup bgColor="bg-gitify-account-rest">
<HoverGroup bgColor="group-hover:bg-gitify-account-rest">
<HoverButton
label="My Issues"
icon={IssueOpenedIcon}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export const NotificationRow: FC<INotificationRow> = ({
</Stack>

{!animateExit && (
<HoverGroup bgColor="bg-gitify-notification-hover">
<HoverGroup bgColor="group-hover:bg-gitify-notification-hover">
<HoverButton
label="Mark as done"
icon={CheckIcon}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const RepositoryNotifications: FC<IRepositoryNotifications> = ({
</Button>

{!animateExit && (
<HoverGroup bgColor="bg-gitify-repository">
<HoverGroup bgColor="group-hover:bg-gitify-repository">
<HoverButton
label="Mark repository as done"
icon={CheckIcon}
Expand Down
6 changes: 5 additions & 1 deletion src/renderer/components/primitives/HoverGroup.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { HoverGroup } from './HoverGroup';

describe('renderer/components/primitives/HoverGroup.tsx', () => {
it('should render', () => {
const tree = render(<HoverGroup bgColor="white">Hover Group</HoverGroup>);
const tree = render(
<HoverGroup bgColor="group-hover:bg-gitify-repository">
Hover Group
</HoverGroup>,
);
expect(tree).toMatchSnapshot();
});
});
7 changes: 5 additions & 2 deletions src/renderer/components/primitives/HoverGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import { Stack } from '@primer/react';
import { cn } from '../../utils/cn';

interface IHoverGroup {
bgColor: string;
children: ReactNode;
bgColor:
| 'group-hover:bg-gitify-account-rest'
| 'group-hover:bg-gitify-repository'
| 'group-hover:bg-gitify-notification-hover';
}

export const HoverGroup: FC<IHoverGroup> = ({
Expand All @@ -20,7 +23,7 @@ export const HoverGroup: FC<IHoverGroup> = ({
className={cn(
'absolute right-0 h-full',
'opacity-0 transition-opacity group-hover:opacity-100',
`group-hover:${bgColor}`,
bgColor,
)}
>
{children}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.