UNPKG

1.97 kBSource Map (JSON)View Raw
1{"version":3,"file":"ImageIcon.js","sourceRoot":"../src/","sources":["components/Icon/ImageIcon.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAEpD;;;;GAIG;AACH,MAAM,CAAC,IAAM,SAAS,GAA6C,UAAA,KAAK;IAC9D,IAAA,2BAAS,EAAE,6BAAU,CAAW;IAExC,IAAM,WAAW,GAAG,cAAc,CAAuC,KAAK,EAAE,qBAAqB,CAAC,CAAC;IAEvG,IAAM,cAAc,GAAG,KAAK,CAAC,YAAY,CAAC;QACxC,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC;YACE,IAAI,EAAE,cAAc;YACpB,aAAa,EAAE,UAAU,CAAC,GAAG,IAAI,UAAU,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;SAC9E,CAAC;IAEN,OAAO,CACL,wCAAS,cAAc,EAAM,WAAW,IAAE,SAAS,EAAE,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,IAAI,EAAE,UAAU,CAAC,KAAK,EAAE,SAAS,CAAC;QAC7G,oBAAC,KAAK,eAAK,UAAU,EAAI,CACrB,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import * as React from 'react';\n\nimport { IImageIconProps } from './Icon.types';\nimport { Image } from '../Image/Image';\nimport { css, getNativeProps, htmlElementProperties } from '../../Utilities';\nimport { classNames, MS_ICON } from './Icon.styles';\n\n/**\n * Fast icon component which only supports images (not font glyphs) and can't be targeted by customizations.\n * To style the icon, use `className` or reference `ms-Icon` in CSS.\n * {@docCategory Icon}\n */\nexport const ImageIcon: React.FunctionComponent<IImageIconProps> = props => {\n const { className, imageProps } = props;\n\n const nativeProps = getNativeProps<React.HTMLAttributes<HTMLDivElement>>(props, htmlElementProperties);\n\n const containerProps = props['aria-label']\n ? {}\n : {\n role: 'presentation',\n 'aria-hidden': imageProps.alt || imageProps['aria-labelledby'] ? false : true,\n };\n\n return (\n <div {...containerProps} {...nativeProps} className={css(MS_ICON, classNames.root, classNames.image, className)}>\n <Image {...imageProps} />\n </div>\n );\n};\n"]}
\No newline at end of file