Hey is a decentralized and permissionless social media app built with Lens Protocol 馃尶
1import type { JSX, ReactNode } from "react";
2import { createElement, forwardRef } from "react";
3import cn from "@/helpers/cn";
4
5interface TypographyProps {
6 as?: keyof JSX.IntrinsicElements;
7 children: ReactNode;
8 className?: string;
9}
10
11export const H2 = forwardRef<HTMLHeadingElement, TypographyProps>(
12 ({ as = "h2", children, className = "" }, ref) =>
13 createElement(
14 as,
15 { className: cn("text-3xl font-bold", className), ref },
16 children
17 )
18);
19
20export const H3 = forwardRef<HTMLHeadingElement, TypographyProps>(
21 ({ as = "h3", children, className = "" }, ref) =>
22 createElement(
23 as,
24 { className: cn("text-2xl font-bold", className), ref },
25 children
26 )
27);
28
29export const H4 = forwardRef<HTMLHeadingElement, TypographyProps>(
30 ({ as = "h4", children, className = "" }, ref) =>
31 createElement(
32 as,
33 { className: cn("text-xl font-bold", className), ref },
34 children
35 )
36);
37
38export const H5 = forwardRef<HTMLHeadingElement, TypographyProps>(
39 ({ as = "h5", children, className = "" }, ref) =>
40 createElement(
41 as,
42 { className: cn("text-lg font-bold", className), ref },
43 children
44 )
45);
46
47export const H6 = forwardRef<HTMLHeadingElement, TypographyProps>(
48 ({ as = "h6", children, className = "" }, ref) =>
49 createElement(
50 as,
51 { className: cn("text-sm font-bold", className), ref },
52 children
53 )
54);