import { JSX, ParentComponent, splitProps, type Ref } from "solid-js"; import { Dynamic } from "solid-js/web"; import typography from "./typography.module.css"; import { mergeClass } from "../utils"; type AnyElement = keyof JSX.IntrinsicElements | ParentComponent type PropsOf = E extends ParentComponent ? Props : E extends keyof JSX.IntrinsicElements ? JSX.IntrinsicElements[E] : JSX.HTMLAttributes; export type TypographyProps< E extends AnyElement, > = { ref?: Ref; component?: E; class?: string; } & PropsOf; type TypographyKind = | "display4" | "display3" | "display2" | "display1" | "headline" | "title" | "subheading" | "body1" | "body2" | "caption" | "buttonText"; export function Typography(props: {typography: TypographyKind } & TypographyProps) { const [managed, passthough] = splitProps(props, [ "ref", "component", "class", "typography", ]); const classes = () => mergeClass(managed.class, typography[managed.typography]); return ( ); }; export function Display4(props: TypographyProps) { return } export function Display3(props: TypographyProps) { return } export function Display2(props: TypographyProps) { return } export function Display1(props: TypographyProps) { return } export function Headline(props: TypographyProps) { return } export function Title(props: TypographyProps) { return } export function Subheading(props: TypographyProps) { return } export function Body1(props: TypographyProps) { return } export function Body2(props: TypographyProps) { return } export function Caption(props: TypographyProps) { return } export function ButtonText(props: TypographyProps) { return }