diff --git a/package.json b/package.json index 307592f..bc5161a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@babylonlabs-io/bbn-core-ui", - "version": "0.0.3", + "version": "0.0.4", "type": "module", "types": "dist/index.d.ts", "publishConfig": { @@ -84,4 +84,4 @@ "plugin:storybook/recommended" ] } -} \ No newline at end of file +} diff --git a/src/components/Text/Text.tsx b/src/components/Text/Text.tsx index 5621623..395b0e0 100644 --- a/src/components/Text/Text.tsx +++ b/src/components/Text/Text.tsx @@ -1,4 +1,4 @@ -import { HTMLProps, createElement, forwardRef } from "react"; +import { type HTMLProps, createElement, forwardRef } from "react"; import { twMerge } from "tailwind-merge"; const STYLES = { @@ -13,12 +13,12 @@ const STYLES = { type Variant = keyof typeof STYLES; export interface TextProps extends HTMLProps { - variant: Variant; + variant?: Variant; as?: string; } export const Text = forwardRef( - ({ variant, as = "p", children, className, ...restProps }, ref) => { + ({ variant = "body1", as = "p", children, className, ...restProps }, ref) => { return createElement( as, {