/** @jsxRuntime classic */ /** @jsx jsx */ import { type SVGAttributes, forwardRef, type ReactNode } from 'react' import { type ResponsiveProp, jsx, mapResponsiveProp } from '@keystone-ui/core' export type IconProps = SVGAttributes & { /** The color for the SVG fill property. */ color?: string /** The size key for the icon. */ size?: ResponsiveProp | number } // TODO: Move to theme? const sizeMap = { small: 16, smallish: 20, medium: 24, largish: 28, large: 32, } export const createIcon = (children: ReactNode, name: string) => { const Icon = forwardRef( ({ size = 'medium', color, ...props }: IconProps, ref: any) => { const resolvedSize = typeof size === 'number' ? size : mapResponsiveProp(size, sizeMap) return ( ) } ) Icon.displayName = name return Icon }