@hhgtech/hhg-components
Version:
Hello Health Group common components
117 lines (111 loc) • 4.71 kB
JavaScript
'use strict';
var React = require('react');
var index = require('./index-db44e8cb.js');
var useScreenSize = require('./useScreenSize-30f50b76.js');
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
var React__default = /*#__PURE__*/_interopDefault(React);
const _LogoIcon = ({ type, width, height }) => {
const data = React.useMemo(() => {
switch (type) {
case 'hellobacsi':
return {
width: width || '107px',
height: height || '24px',
src: index.CommonGAssets.getAssetPath('logo/hellobacsi.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 } = data || {};
return (React__default["default"].createElement(useScreenSize.ImageWrap, { alt: `${type} logo`, className: "main-logo-icon", src: src, style: {
width: logoWidth,
height: logoHeight,
} }));
};
const LogoIcon = React.memo(_LogoIcon);
exports.LogoIcon = LogoIcon;