Skip to content

Commit 4ea9f06

Browse files
committed
fix: code review
- Test to be written without function uses todo method - Change from arrow function to function (convention) - Simplifying Interface Names - Remove the stories to omit the chromatic approval process during the design phase - Remove test code Korean comment
1 parent a9d5d68 commit 4ea9f06

File tree

3 files changed

+12
-35
lines changed

3 files changed

+12
-35
lines changed

src/components/Link/Link.stories.tsx

Lines changed: 0 additions & 14 deletions
This file was deleted.

src/components/Link/Link.test.tsx

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,19 @@
11
import { test } from "vitest";
22

3-
/** children이 올바르게 렌더링되는지 확인합니다. */
4-
test("renders children correctly");
3+
test.todo("renders children correctly");
54

6-
/** tone prop에 따라 올바른 톤이 적용되는지 확인합니다. */
7-
test("applies the correct tone based on the 'tone' prop");
5+
test.todo("applies the correct tone based on the 'tone' prop");
86

9-
/** size prop에 따라 올바른 폰트 크기가 적용되는지 확인합니다. */
10-
test("applies the correct font size based on the 'size' prop");
7+
test.todo("applies the correct font size based on the 'size' prop");
118

12-
/** weight prop에 따라 올바른 폰트 굵기가 적용되는지 확인합니다. */
13-
test("applies the correct font weight based on the 'weight' prop");
9+
test.todo("applies the correct font weight based on the 'weight' prop");
1410

15-
/** muted가 true일 때 명암비가 낮게 렌더링되는지 확인합니다. */
16-
test("renders with reduced contrast when 'muted' is true");
11+
test.todo("renders with reduced contrast when 'muted' is true");
1712

18-
/** underline이 true일 때 밑줄이 표시되는지 확인합니다. */
19-
test("renders with underline when 'underline' is true");
13+
test.todo("renders with underline when 'underline' is true");
2014

21-
/** href, target 등의 추가 anchor 속성이 정상적으로 전달되는지 확인합니다. */
22-
test("forwards additional anchor props like 'href' and 'target'");
15+
test.todo("forwards additional anchor props like 'href' and 'target'");
2316

24-
/** target이 '_blank'일 때 보안을 위해 rel="noopener noreferrer"가 자동으로 추가되는지 확인합니다. */
25-
test("adds rel='noopener noreferrer' when target is '_blank'");
17+
test.todo("adds rel='noopener noreferrer' when target is '_blank'");
2618

27-
/** Icon 컴포넌트와 같이 사용할 수 있는지 확인합니다. */
28-
test("can be used with Icon component");
19+
test.todo("can be used with Icon component");

src/components/Link/Link.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { AnchorHTMLAttributes, PropsWithChildren } from "react";
22
import type { Tone } from "../../tokens/colors";
33
import type { FontSize, FontWeight } from "../../tokens/typography";
44

5-
interface LinkWithoutChildren extends AnchorHTMLAttributes<HTMLAnchorElement> {
5+
interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
66
/** 색조 */
77
tone?: Tone;
88
/** 크기 */
@@ -15,6 +15,6 @@ interface LinkWithoutChildren extends AnchorHTMLAttributes<HTMLAnchorElement> {
1515
underline?: boolean;
1616
}
1717

18-
export const Link = ({ children }: PropsWithChildren<LinkWithoutChildren>) => {
18+
export function Link({ children }: PropsWithChildren<LinkProps>) {
1919
return <>{children}</>;
20-
};
20+
}

0 commit comments

Comments
 (0)