Skip to content

Commit 4927366

Browse files
committed
refactor: small nits
1 parent e8c2872 commit 4927366

3 files changed

Lines changed: 13 additions & 16 deletions

File tree

apps/site/components/Downloads/ReleaseOverview/index.module.css

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@
3232
}
3333

3434
svg {
35-
@apply h-4
36-
w-4;
35+
@apply size-4;
3736
}
3837
}
3938
}

apps/site/components/Downloads/ReleaseOverview/index.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ import {
55
Square3Stack3DIcon,
66
} from '@heroicons/react/24/outline';
77
import { useTranslations } from 'next-intl';
8-
import type { FC, ReactNode } from 'react';
8+
import type { FC, ReactNode, SVGProps } from 'react';
99

1010
import FormattedTime from '@/components/Common/FormattedTime';
1111
import type { NodeRelease } from '@/types';
1212

1313
import styles from './index.module.css';
1414

1515
type ItemProps = {
16-
icon: React.JSX.Element;
16+
Icon: FC<SVGProps<SVGSVGElement>>;
1717
title: ReactNode;
1818
subtitle: ReactNode;
1919
};
2020

21-
const Item: FC<ItemProps> = ({ icon, title, subtitle }) => {
21+
const Item: FC<ItemProps> = ({ Icon, title, subtitle }) => {
2222
return (
2323
<div className={styles.item}>
24-
{icon}
24+
<Icon />
2525
<div>
2626
<h2>{subtitle}</h2>
2727
<h1>{title}</h1>
@@ -41,36 +41,36 @@ export const ReleaseOverview: FC<ReleaseOverviewProps> = ({ release }) => {
4141
<div className={styles.root}>
4242
<div className={styles.container}>
4343
<Item
44-
icon={<CalendarIcon />}
44+
Icon={CalendarIcon}
4545
title={<FormattedTime date={release.currentStart} />}
4646
subtitle={t('components.releaseOverview.firstReleased')}
4747
/>
4848
<Item
49-
icon={<ClockIcon />}
49+
Icon={ClockIcon}
5050
title={<FormattedTime date={release.releaseDate} />}
5151
subtitle={t('components.releaseOverview.lastUpdated')}
5252
/>
5353
<Item
54-
icon={<Square3Stack3DIcon />}
54+
Icon={Square3Stack3DIcon}
5555
title={release.minorVersions.length}
5656
subtitle={t('components.releaseOverview.minorVersions')}
5757
/>
5858
{release.modules && (
5959
<Item
60-
icon={<CodeBracketSquareIcon />}
60+
Icon={CodeBracketSquareIcon}
6161
title={`v${release.modules}`}
6262
subtitle={t('components.releaseOverview.nApiVersion')}
6363
/>
6464
)}
6565
{release.npm && (
6666
<Item
67-
icon={<CodeBracketSquareIcon />}
67+
Icon={CodeBracketSquareIcon}
6868
title={`v${release.npm}`}
6969
subtitle={t('components.releaseOverview.npmVersion')}
7070
/>
7171
)}
7272
<Item
73-
icon={<CodeBracketSquareIcon />}
73+
Icon={CodeBracketSquareIcon}
7474
title={`v${release.v8}`}
7575
subtitle={t('components.releaseOverview.v8Version')}
7676
/>

packages/ui-components/Common/Separator/index.tsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,11 @@
22

33
import * as SeparatorPrimitive from '@radix-ui/react-separator';
44
import classNames from 'classnames';
5-
import type * as React from 'react';
5+
import type { FC, ComponentProps } from 'react';
66

77
import styles from './index.module.css';
88

9-
const Separator: React.FC<
10-
React.ComponentProps<typeof SeparatorPrimitive.Root>
11-
> = ({
9+
const Separator: FC<ComponentProps<typeof SeparatorPrimitive.Root>> = ({
1210
className,
1311
orientation = 'horizontal',
1412
decorative = true,

0 commit comments

Comments
 (0)