export type Size = "2xs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "inherit" ; export function normalizeSize < T extends Size > ( size ? ) { return size || "md" ; } export type SizeAdapter < T extends Size > = Partial < Record < Size , T > > ; export function createSizeAdapter < T extends Size > ( adapter ) { return ( size ) => adapter [ normalizeSize ( size ) ] ; } export function adaptSize < T extends Size > ( size , adapter ) { return adapter [ normalizeSize ( size ) ] ; }