<aside>
โ๏ธย ย Authors: Felix
๐ Reviewers: -
โ๏ธย Status: -
</aside>
๊ธฐ์ ๋ช ์ธ์๊ฐ ๋ค๋ฃจ๋ ์์ ์ ๋ํ ์์ฝ
๊ธฐ์ ์ ์ผ๋ก ๋ง์กฑํด์ผ ํ ์กฐ๊ฑด ๋ฐ ๋์ณ์ ์ ๋๋ ํฌ์ธํธ
๋ธ๋์น, ๋ชจ๋, ์ธํฐํ์ด์ค, ์ํ ๊ด๋ฆฌ ์ ๋ต, ๋ฐ์ดํฐ ํ๋ฆ, ๋ผ์ฐํ ๊ตฌ์กฐ, ์๋ ํํฐ ๋ผ์ด๋ธ๋ฌ๋ฆฌ, ์ ๋๋ฉ์ด์ , ์ ๊ทผ์ฑ, ์ค์ผ๋ ํค, ์๋ฌ ํธ๋ค๋ง ๋ฑ
๋ธ๋์น
๋ชจ๋
์ธํฐํ์ด์ค
export default function Page() {
return (
<div>
<Button variants="primary" size="lg">My Button</Button>
<Button variants="secondary" size="lg">My Button</Button>
<Button>
<MyIcon />
<span>My Button</span>
</Button>
<Button as="a" href="#">
<MyIcon />
<span>My Button</span>
</Button>
</div>
)
}
export const Button = forwardRef((
{ as, ...props }: PolymorphicProps<E, ButtonOwnProps>,
ref: React.Ref<Element>
) => {
const Component = as || "button"
return <Component ref={ref} {...props} />
}
)