fd57a35820
Release package / release (push) Successful in 1h12m42s
Co-authored-by: Thanh Quy - wolf <524H0124@student.tdtu.edu.vn> Reviewed-on: #28 Reviewed-by: TakahashiNguyen <takahashi.ng@icloud.com> Co-authored-by: TaNguyenThanhQuy <tanguyenthanhquy@noreply.localhost> Co-committed-by: TaNguyenThanhQuy <tanguyenthanhquy@noreply.localhost>
22 lines
519 B
TypeScript
22 lines
519 B
TypeScript
import type { TextProps } from "./Typography.types";
|
|
|
|
export default function Text({
|
|
variant = "body1",
|
|
children,
|
|
className = "",
|
|
...props
|
|
}: TextProps) {
|
|
const variants = {
|
|
body1: "text-base text-(--color-text-primary)",
|
|
body2: "text-sm text-(--color-text-secondary)",
|
|
caption: "text-xs text-(--color-text-muted)",
|
|
label: "text-sm font-medium text-(--color-text-secondary)",
|
|
};
|
|
|
|
return (
|
|
<p className={`${variants[variant]} ${className}`} {...props}>
|
|
{children}
|
|
</p>
|
|
);
|
|
}
|