mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-24 09:25:15 +00:00
1 line
9.7 KiB
JSON
1 line
9.7 KiB
JSON
|
{"ast":null,"code":"import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport React from 'react';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport { mapToCssModules, tagPropType } from './utils';\nvar propTypes = {\n tag: tagPropType,\n icon: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),\n wrapTag: tagPropType,\n toggle: PropTypes.func,\n className: PropTypes.string,\n cssModule: PropTypes.object,\n children: PropTypes.node,\n closeAriaLabel: PropTypes.string,\n charCode: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n close: PropTypes.object\n};\nvar defaultProps = {\n tag: 'strong',\n wrapTag: 'div',\n tagClassName: 'mr-auto',\n closeAriaLabel: 'Close',\n charCode: 215\n};\n\nvar ToastHeader = function ToastHeader(props) {\n var closeButton;\n var icon;\n\n var className = props.className,\n cssModule = props.cssModule,\n children = props.children,\n toggle = props.toggle,\n Tag = props.tag,\n WrapTag = props.wrapTag,\n closeAriaLabel = props.closeAriaLabel,\n charCode = props.charCode,\n close = props.close,\n tagClassName = props.tagClassName,\n iconProp = props.icon,\n attributes = _objectWithoutPropertiesLoose(props, [\"className\", \"cssModule\", \"children\", \"toggle\", \"tag\", \"wrapTag\", \"closeAriaLabel\", \"charCode\", \"close\", \"tagClassName\", \"icon\"]);\n\n var classes = mapToCssModules(classNames(className, 'toast-header'), cssModule);\n\n if (!close && toggle) {\n var closeIcon = typeof charCode === 'number' ? String.fromCharCode(charCode) : charCode;\n closeButton = /*#__PURE__*/React.createElement(\"button\", {\n type: \"button\",\n onClick: toggle,\n className: mapToCssModules('close', cssModule),\n \"aria-label\": closeAriaLabel\n }, /*#__PURE__*/React.createElement(\"span\", {\n \"aria-hidden\": \"true\"\n }, closeIcon));\n }\n\n if (typeof iconProp === \"string\") {\n icon = /*#__PURE__*/React.createElement(\"svg\", {\n className: mapToCssModules(\"rounded text-\" + iconProp),\n width: \"20\",\n height: \"20\",\n xmlns: \"http://www.w3.org/2000/svg\",\n preserveAspectRatio: \"xMidYMid slice\",\n focusable: \"false\",\n role: \"img\"\n }, /*#__PURE__*/React.createElement(\"rect\", {\n fill: \"currentColor\",\n width: \"100%\",\n height: \"100%\"\n }));\n } else if (iconProp) {\n icon = iconProp;\n }\n\n return /*#__PURE__*/React.createElement(WrapTag, _extends({}, attributes, {\n className: classes\n }), icon, /*#__PURE__*/React.createElement(Tag, {\n className: mapToCssModules(classNames(tagClassName, {\n \"ml-2\": icon != null\n }), cssModule)\n }, children), close || closeButton);\n};\n\nToastHeader.propTypes = propTypes;\nToastHeader.defaultProps = defaultProps;\nexport default ToastHeader;","map":{"version":3,"sources":["/app/node_modules/reactstrap/es/ToastHeader.js"],"names":["_extends","_objectWithoutPropertiesLoose","React","PropTypes","classNames","mapToCssModules","tagPropType","propTypes","tag","icon","oneOfType","string","node","wrapTag","toggle","func","className","cssModule","object","children","closeAriaLabel","charCode","number","close","defaultProps","tagClassName","ToastHeader","props","closeButton","Tag","WrapTag","iconProp","attributes","classes","closeIcon","String","fromCharCode","createElement","type","onClick","width","height","xmlns","preserveAspectRatio","focusable","role","fill"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,oCAArB;AACA,OAAOC,6BAAP,MAA0C,yDAA1C;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAASC,eAAT,EAA0BC,WAA1B,QAA6C,SAA7C;AACA,IAAIC,SAAS,GAAG;AACdC,EAAAA,GAAG,EAAEF,WADS;AAEdG,EAAAA,IAAI,EAAEN,SAAS,CAACO,SAAV,CAAoB,CAACP,SAAS,CAACQ,MAAX,EAAmBR,SAAS,CAACS,IAA7B,CAApB,CAFQ;AAGdC,EAAAA,OAAO,EAAEP,WAHK;AAIdQ,EAAAA,MAAM,EAAEX,SAAS,CAACY,IAJJ;AAKdC,EAAAA,SAAS,E
|