UNPKG

@hhgtech/hhg-components

Version:
118 lines (112 loc) 4.83 kB
'use strict'; var React = require('react'); var index = require('./index-9301f298.js'); var index$1 = require('./index-6b44ec2b.js'); function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; } var React__default = /*#__PURE__*/_interopDefault(React); const _LogoIcon = ({ type, width, height, isLight }) => { const data = React.useMemo(() => { switch (type) { case 'hellobacsi': return { width: width || '107px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellobacsi.png'), srcLight: index.CommonGAssets.getAssetPath('logo/hellobacsi-light.png'), }; case 'hellodoktor': return { width: width || '127px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellodoktor.png'), }; case 'hellosehat': return { width: width || '121px', height: height || '27px', src: index.CommonGAssets.getAssetPath('logo/hellosehat.png'), }; case 'hellojiankang': return { width: width || '87px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellojiankang.png'), }; case 'hellohealth': return { width: width || '123px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellohealth.png'), }; case 'hellotogether': return { width: width || '150px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellotogether.png'), }; case 'hellocare': return { width: width || '99px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellocare.png'), }; case 'hellodoctor': return { width: width || '127px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellodoctor.png'), }; case 'hellokrupet': return { width: width || '101px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellokrupet.png'), }; case 'hellosayarwon': return { width: width || '111px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellosayarwon.png'), }; case 'helloyishi': return { width: width || '89px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/helloyishi.png'), }; case 'hellokhunmor': return { width: width || '123px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/hellokhunmor.png'), }; case 'helloswasthya': return { width: width || '105px', height: height || '24px', src: index.CommonGAssets.getAssetPath('logo/helloswasthya.png'), }; case 'logomark': return { width: width || '60px', height: height || '57px', src: index.CommonGAssets.getAssetPath('logo/logomark.png'), }; case 'marryBaby': return { width: width || '145px', height: height || '28px', src: index.CommonGAssets.getAssetPath('logo/marrybaby.png'), }; default: return null; } }, [type, width, height]); const { src, width: logoWidth, height: logoHeight, srcLight } = data || {}; return (React__default["default"].createElement(index$1.ImageWrap, { alt: `${type} logo`, className: "main-logo-icon", src: isLight ? srcLight || src : src, style: { width: logoWidth, height: logoHeight, } })); }; const LogoIcon = React.memo(_LogoIcon); exports.LogoIcon = LogoIcon;