@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 1.67 kB
Source Map (JSON)
{"version":3,"file":"icon.cjs","names":["createComponent","iconStyle","useInjectVarsIntoCss","useInjectVarsIntoProps"],"sources":["../../../../src/components/icon/icon.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { IconStyle } from \"./icon.style\"\nimport {\n createComponent,\n useInjectVarsIntoCss,\n useInjectVarsIntoProps,\n} from \"../../core\"\nimport { iconStyle } from \"./icon.style\"\n\nexport interface IconProps\n extends HTMLStyledProps<\"svg\">,\n ThemeProps<IconStyle> {}\n\nconst {\n component,\n PropsContext: IconPropsContext,\n usePropsContext: useIconPropsContext,\n withContext,\n} = createComponent<IconProps, IconStyle>(\"icon\", iconStyle)\n\nexport { component, IconPropsContext, useIconPropsContext, withContext }\n\n/**\n * `Icon` is a general icon component that can be used in your projects.\n *\n * @see https://yamada-ui.com/docs/components/icon\n */\nexport const Icon = withContext(\"svg\")(\n {\n \"aria-hidden\": true,\n \"data-icon\": \"\",\n role: \"img\",\n verticalAlign: \"middle\",\n },\n (props) => {\n const css = useInjectVarsIntoCss(props.css, { fontSize: \"size\" })\n const rest = useInjectVarsIntoProps(props, { fontSize: \"size\" })\n\n return { boxSize: \"{size}\", ...rest, css }\n },\n)\n"],"mappings":";;;;;;;;AAeA,MAAM,EACJ,WACA,cAAc,kBACd,iBAAiB,qBACjB,gBACEA,yCAAsC,QAAQC,6BAAU;;;;;;AAS5D,MAAa,OAAO,YAAY,MAAM,CACpC;CACE,eAAe;CACf,aAAa;CACb,MAAM;CACN,eAAe;CAChB,GACA,UAAU;CACT,MAAM,MAAMC,6CAAqB,MAAM,KAAK,EAAE,UAAU,QAAQ,CAAC;AAGjE,QAAO;EAAE,SAAS;EAAU,GAFfC,+CAAuB,OAAO,EAAE,UAAU,QAAQ,CAAC;EAE3B;EAAK;EAE7C"}