Skip to content

Commit 56761d7

Browse files
authored
Merge pull request #147 from DaleStudy/35-link-component-design
Link component design
2 parents da1f9a1 + 9d8f9b3 commit 56761d7

File tree

2 files changed

+39
-0
lines changed

2 files changed

+39
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import { test } from "vitest";
2+
3+
test.todo("renders children correctly");
4+
5+
test.todo("applies the correct tone based on the 'tone' prop");
6+
7+
test.todo("applies the correct font size based on the 'size' prop");
8+
9+
test.todo("applies the correct font weight based on the 'weight' prop");
10+
11+
test.todo("renders with reduced contrast when 'muted' is true");
12+
13+
test.todo("renders with underline when 'underline' is true");
14+
15+
test.todo("forwards additional anchor props like 'href' and 'target'");
16+
17+
test.todo("adds rel='noopener noreferrer' when target is '_blank'");
18+
19+
test.todo("can be used with Icon component");
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
import type { AnchorHTMLAttributes, PropsWithChildren } from "react";
2+
import type { Tone } from "../../tokens/colors";
3+
import type { FontSize, FontWeight } from "../../tokens/typography";
4+
5+
interface LinkProps extends AnchorHTMLAttributes<HTMLAnchorElement> {
6+
/** ์ƒ‰์กฐ */
7+
tone?: Tone;
8+
/** ํฌ๊ธฐ */
9+
size?: FontSize;
10+
/** ๊ตต๊ธฐ */
11+
weight?: FontWeight;
12+
/** ๋ช…์•”๋น„ ๋‚ฎ์ถœ์ง€ */
13+
muted?: boolean;
14+
/** ๋งํฌ์— ๋ฐ‘์ค„ ํ‘œ์‹œ ์—ฌ๋ถ€ */
15+
underline?: boolean;
16+
}
17+
18+
export function Link({ children }: PropsWithChildren<LinkProps>) {
19+
return <>{children}</>;
20+
}

0 commit comments

Comments
ย (0)