Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | 332x 332x 332x | import type React from "react";
import type { Role } from "react-native";
import type { VariantProps } from "class-variance-authority";
import { tv } from "tailwind-variants";
export const textVariants = tv({
slots: {
base: "m-0 font-sans",
},
variants: {
variant: {
span: "text-base font-normal",
h1: "text-4xl font-extrabold tracking-tight",
h2: "text-3xl font-semibold tracking-tight",
h3: "text-2xl font-semibold tracking-tight",
h4: "text-xl font-semibold tracking-tight",
p: "text-base font-normal",
blockquote: "border-l-2 pl-3 text-base font-normal italic",
code: "relative rounded-sm font-mono text-sm font-semibold",
},
},
defaultVariants: {
variant: "span",
},
});
export type TextVariant = NonNullable<
VariantProps<typeof textVariants>["variant"]
>;
export const ROLE: Partial<Record<TextVariant, React.AriaRole & Role>> = {
h1: "heading",
h2: "heading",
h3: "heading",
h4: "heading",
};
export const ARIA_LEVEL: Partial<Record<TextVariant, number>> = {
h1: 1,
h2: 2,
h3: 3,
h4: 4,
};
|