@hhgtech/hhg-components
Version:
Hello Health Group common components
112 lines (109 loc) • 4.59 kB
JavaScript
import React__default, { memo, useMemo } from 'react';
import { C as CommonGAssets } from './index-7adf994c.js';
import { I as ImageWrap } from './index-50aea2c8.js';
const _LogoIcon = ({ type, width, height, isLight }) => {
const data = useMemo(() => {
switch (type) {
case 'hellobacsi':
return {
width: width || '107px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellobacsi.png'),
srcLight: CommonGAssets.getAssetPath('logo/hellobacsi-light.png'),
};
case 'hellodoktor':
return {
width: width || '127px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellodoktor.png'),
};
case 'hellosehat':
return {
width: width || '121px',
height: height || '27px',
src: CommonGAssets.getAssetPath('logo/hellosehat.png'),
};
case 'hellojiankang':
return {
width: width || '87px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellojiankang.png'),
};
case 'hellohealth':
return {
width: width || '123px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellohealth.png'),
};
case 'hellotogether':
return {
width: width || '150px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellotogether.png'),
};
case 'hellocare':
return {
width: width || '99px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellocare.png'),
};
case 'hellodoctor':
return {
width: width || '127px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellodoctor.png'),
};
case 'hellokrupet':
return {
width: width || '101px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellokrupet.png'),
};
case 'hellosayarwon':
return {
width: width || '111px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellosayarwon.png'),
};
case 'helloyishi':
return {
width: width || '89px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/helloyishi.png'),
};
case 'hellokhunmor':
return {
width: width || '123px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/hellokhunmor.png'),
};
case 'helloswasthya':
return {
width: width || '105px',
height: height || '24px',
src: CommonGAssets.getAssetPath('logo/helloswasthya.png'),
};
case 'logomark':
return {
width: width || '60px',
height: height || '57px',
src: CommonGAssets.getAssetPath('logo/logomark.png'),
};
case 'marryBaby':
return {
width: width || '145px',
height: height || '28px',
src: CommonGAssets.getAssetPath('logo/marrybaby.png'),
};
default:
return null;
}
}, [type, width, height]);
const { src, width: logoWidth, height: logoHeight, srcLight } = data || {};
return (React__default.createElement(ImageWrap, { alt: `${type} logo`, className: "main-logo-icon", src: isLight ? srcLight || src : src, style: {
width: logoWidth,
height: logoHeight,
} }));
};
const LogoIcon = memo(_LogoIcon);
export { LogoIcon as L };