Skip to content

Commit

Permalink
refactor: use Icon instead of deprecated Octicon component (gitify-ap…
Browse files Browse the repository at this point in the history
…p#1747)

Signed-off-by: Adam Setch <adam.setch@outlook.com>
  • Loading branch information
setchy authored Jan 20, 2025
1 parent 735d742 commit 841faab
Show file tree
Hide file tree
Showing 15 changed files with 137 additions and 141 deletions.
4 changes: 2 additions & 2 deletions src/renderer/components/buttons/PillButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { FC } from 'react';

import type { Icon } from '@primer/octicons-react';
import { Octicon, Stack, Text } from '@primer/react';
import { Stack, Text } from '@primer/react';

import { type IconColor, Size } from '../../types';

Expand All @@ -21,7 +21,7 @@ export const PillButton: FC<IPillButton> = (props: IPillButton) => {
className="flex gap-1 items-center text-xxs px-1 m-0.5 rounded-full bg-gitify-pill-rest hover:bg-gitify-pill-hover"
>
<Stack direction="horizontal" align="center" gap="condensed">
<Octicon icon={props.icon} size={Size.XSMALL} className={props.color} />
<props.icon size={Size.XSMALL} className={props.color} />
{props.metric && <Text>{props.metric}</Text>}
</Stack>
</button>
Expand Down

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

8 changes: 2 additions & 6 deletions src/renderer/components/notifications/NotificationRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
} from 'react';

import { BellSlashIcon, CheckIcon, ReadIcon } from '@primer/octicons-react';
import { IconButton, Octicon, Tooltip } from '@primer/react';
import { IconButton, Tooltip } from '@primer/react';

import { AppContext } from '../../context/App';
import { Opacity, Size } from '../../types';
Expand Down Expand Up @@ -96,11 +96,7 @@ export const NotificationRow: FC<INotificationRow> = ({
>
<div className="mr-3 flex items-center justify-center">
<Tooltip text={notificationType} direction="e">
<Octicon
icon={NotificationIcon}
size={Size.LARGE}
className={iconColor}
/>
<NotificationIcon size={Size.LARGE} className={iconColor} />
</Tooltip>
</div>

Expand Down

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

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

Loading

0 comments on commit 841faab

Please sign in to comment.