{"$schema":"https:\/\/ui.particle.academy\/schema\/registry-item.json","name":"heading","type":"registry:ui","title":"Heading","description":"Heading from react-fancy","package":"react-fancy","dependencies":[],"registryDependencies":[],"files":[{"path":"components\/fancy\/heading\/Heading.tsx","content":"import { forwardRef } from \"react\";\r\nimport { cn } from \"..\/..\/utils\/cn\";\r\nimport type { HeadingProps } from \".\/Heading.types\";\r\n\r\nconst sizeClasses: Record<NonNullable<HeadingProps[\"size\"]>, string> = {\r\n  xs: \"text-xs\",\r\n  sm: \"text-sm\",\r\n  md: \"text-base\",\r\n  lg: \"text-lg\",\r\n  xl: \"text-2xl\",\r\n  \"2xl\": \"text-4xl\",\r\n};\r\n\r\nconst weightClasses: Record<NonNullable<HeadingProps[\"weight\"]>, string> = {\r\n  normal: \"font-normal\",\r\n  medium: \"font-medium\",\r\n  semibold: \"font-semibold\",\r\n  bold: \"font-bold\",\r\n};\r\n\r\nexport const Heading = forwardRef<HTMLHeadingElement, HeadingProps>(\r\n  (\r\n    {\r\n      as: Tag = \"h2\",\r\n      size = \"lg\",\r\n      weight = \"bold\",\r\n      className,\r\n      children,\r\n      ...props\r\n    },\r\n    ref,\r\n  ) => {\r\n    return (\r\n      <Tag\r\n        ref={ref}\r\n        data-react-fancy-heading=\"\"\r\n        className={cn(\r\n          \"text-zinc-900 dark:text-zinc-100\",\r\n          sizeClasses[size],\r\n          weightClasses[weight],\r\n          className,\r\n        )}\r\n        {...props}\r\n      >\r\n        {children}\r\n      <\/Tag>\r\n    );\r\n  },\r\n);\r\n\r\nHeading.displayName = \"Heading\";\r\n","type":"registry:ui","target":"components\/fancy\/heading\/Heading.tsx"},{"path":"components\/fancy\/heading\/Heading.types.ts","content":"import type { HTMLAttributes } from \"react\";\r\n\r\nexport interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {\r\n  \/** Which heading element to render *\/\r\n  as?: \"h1\" | \"h2\" | \"h3\" | \"h4\" | \"h5\" | \"h6\";\r\n  \/** Text size *\/\r\n  size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\";\r\n  \/** Font weight *\/\r\n  weight?: \"normal\" | \"medium\" | \"semibold\" | \"bold\";\r\n}\r\n","type":"registry:ui","target":"components\/fancy\/heading\/Heading.types.ts"},{"path":"components\/fancy\/heading\/index.ts","content":"export { Heading } from \".\/Heading\";\r\nexport type { HeadingProps } from \".\/Heading.types\";\r\n","type":"registry:ui","target":"components\/fancy\/heading\/index.ts"}]}