Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/#13-title #17

Merged
merged 13 commits into from
Jan 11, 2023
Merged
Prev Previous commit
Next Next commit
#13 🔧 className props 추가
  • Loading branch information
BonhaengLee committed Jan 8, 2023
commit fd9eaefeef8136bbc6f00781bd37547e15c82de3
5 changes: 4 additions & 1 deletion src/components/Typography/Heading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type HeadingProps<C extends ElementType> = {
size?: "3xl" | "2xl" | "xl" | "lg" | "md" | "sm";
fw?: "demiLight" | "regular" | "medium" | "bold";
color?: "default" | "darkgray" | "gray" | "lightgray" | "light";
className?: string;
children: ReactNode;
} & ComponentPropsWithoutRef<C>;

Expand All @@ -16,6 +17,7 @@ function Heading<C extends ElementType = "h1">({
size = "lg",
fw = "regular",
color = "default",
className,
children,
...restProps
}: HeadingProps<C>) {
Expand All @@ -27,7 +29,8 @@ function Heading<C extends ElementType = "h1">({
styles.text,
styles[`${size}`],
styles[`${fw}`],
styles[`${color}`]
styles[`${color}`],
className
)}
{...restProps}
>
Expand Down
5 changes: 4 additions & 1 deletion src/components/Typography/Text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ type TextProps<C extends ElementType> = {
size?: "lg" | "md" | "sm" | "xs";
fw?: "demiLight" | "regular" | "medium" | "bold";
color?: "default" | "darkgray" | "gray" | "lightgray" | "light";
className?: string;
children: ReactNode;
} & ComponentPropsWithoutRef<C>;

Expand All @@ -16,6 +17,7 @@ function Text<C extends ElementType = "p">({
size = "lg",
fw = "regular",
color = "default",
className,
children,
...restProps
}: TextProps<C>) {
Expand All @@ -27,7 +29,8 @@ function Text<C extends ElementType = "p">({
styles.text,
styles[`${size}`],
styles[`${fw}`],
styles[`${color}`]
styles[`${color}`],
className
)}
{...restProps}
>
Expand Down