@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
1 lines • 1.24 kB
Source Map (JSON)
{"version":3,"file":"image.cjs","names":["createComponent","imageStyle"],"sources":["../../../../src/components/image/image.tsx"],"sourcesContent":["\"use client\"\n\nimport type { CSSProps, HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { ImageStyle } from \"./image.style\"\nimport { createComponent } from \"../../core\"\nimport { imageStyle } from \"./image.style\"\n\nexport interface ImageProps\n extends HTMLStyledProps<\"img\">,\n ThemeProps<ImageStyle> {\n /**\n * The CSS `object-fit` property.\n */\n fit?: CSSProps[\"objectFit\"]\n}\n\nconst {\n PropsContext: ImagePropsContext,\n usePropsContext: useImagePropsContext,\n withContext,\n} = createComponent<ImageProps, ImageStyle>(\"image\", imageStyle)\n\nexport { ImagePropsContext, useImagePropsContext }\n\n/**\n * `Image` is a component that displays images with fallback support.\n *\n * @see https://yamada-ui.com/docs/components/image\n */\nexport const Image = withContext(\"img\")(undefined, ({ fit, ...rest }) => ({\n objectFit: fit,\n ...rest,\n}))\n"],"mappings":";;;;;;;AAgBA,MAAM,EACJ,cAAc,mBACd,iBAAiB,sBACjB,gBACEA,yCAAwC,SAASC,+BAAW;;;;;;AAShE,MAAa,QAAQ,YAAY,MAAM,CAAC,SAAY,EAAE,IAAK,GAAG,YAAY;CACxE,WAAW;CACX,GAAG;CACJ,EAAE"}