Skip to content

Commit 77ae5e9

Browse files
committed
update ui-components
1 parent 611391f commit 77ae5e9

File tree

4 files changed

+115
-347
lines changed

4 files changed

+115
-347
lines changed

apps/site/components/withNodejsLogo.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const WithNodejsLogo: FC = () => {
99
return (
1010
<NodejsLogo
1111
variant={siteConfig.logoVariant}
12-
ariaLabel={t('layouts.logo')}
12+
aria-label={t('layouts.logo')}
1313
/>
1414
);
1515
};

packages/ui-components/__design__/node-logos.stories.tsx

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,18 @@ import type { Meta as MetaObj, StoryObj } from '@storybook/react';
22

33
import { JsWhite, Nodejs } from '#ui/Icons/Logos';
44

5-
export const HorizontalLogo: StoryObj = {
6-
render: () => <Nodejs width={267} height={80} />,
7-
};
8-
9-
export const PrideLogo: StoryObj = {
10-
render: () => <Nodejs variant="pride" width={267} height={80} />,
11-
};
12-
13-
export const JSSymbols: StoryObj = {
5+
export const NodejsLogos: StoryObj = {
146
render: () => (
15-
<div className="flex flex-row gap-4">
16-
<JsWhite width={30} height={30} />
7+
<div className="flex flex-col gap-6">
8+
{(['default', 'pride'] as const).map(variant => (
9+
<Nodejs key={variant} width={267} height={80} variant={variant} />
10+
))}
11+
<div className="flex flex-row gap-4">
12+
<JsWhite width={30} height={30} />
13+
</div>
1714
</div>
1815
),
16+
name: 'Node.js Logos',
1917
};
2018

2119
export default { title: 'Design System' } as MetaObj;
Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,11 @@
11
import type { FC } from 'react';
22

3-
import NodejsIcon from '#ui/Icons/Logos/Nodejs';
4-
import type { LogoVariant } from '#ui/types';
3+
import NodejsIcon, { type NodeJsLogoProps } from '#ui/Icons/Logos/Nodejs';
54

65
import style from './index.module.css';
76

8-
type NodejsLogoProps = {
9-
variant?: LogoVariant;
10-
ariaLabel?: string;
11-
};
12-
13-
const NodejsLogo: FC<NodejsLogoProps> = ({
14-
variant = 'default',
15-
ariaLabel,
16-
}) => {
17-
return (
18-
<NodejsIcon
19-
variant={variant}
20-
className={style.nodejsLogo}
21-
ariaLabel={ariaLabel}
22-
/>
23-
);
7+
const NodejsLogo: FC<NodeJsLogoProps> = props => {
8+
return <NodejsIcon className={style.nodejsLogo} {...props} />;
249
};
2510

2611
export default NodejsLogo;

0 commit comments

Comments
 (0)