import type { JSX } from "react" import type { ComponentConfig } from './config' import type { IntrinsicElements } from './intrinsic' import type { PartialBy } from './utils' export type PartialByClassName = PartialBy export type ClassNameDefined = { className: string } export type AcceptClassName = { className?: string } type ClassedCreator = { (extractor: (props: P) => string): (props: P) => N (extractor: (props: T & P) => string, config: ComponentConfig): (props: T & P) => N (strings: TemplateStringsArray, ...interpolations: ((props: P) => string)[]): (props: P) => N } export type Classed = { (component: (props: P) => N): ClassedCreator, N> } & { readonly [N in keyof JSX.IntrinsicElements]: ClassedCreator } /** * ## Classed * * Create a classed component. */ export const classed: Classed