From 0a6aadd9fb3839a40b572f204fad270360d9f013 Mon Sep 17 00:00:00 2001 From: Mukul Bansal Date: Fri, 22 Nov 2024 09:54:22 +0530 Subject: [PATCH] feat: add medical services icon affects: @medly-components/icons --- packages/icons/src/Icons.stories.mdx | 11 ++++++++++ .../assets/Custom/medical_services_24px.svg | 8 +++++++ .../src/icons/Custom/MedicalServicesIcon.tsx | 21 +++++++++++++++++++ packages/icons/src/icons/File/NoFileIcon.tsx | 2 +- packages/icons/src/index.ts | 1 + packages/icons/src/templates/icon.ts | 4 +++- 6 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 packages/icons/src/assets/Custom/medical_services_24px.svg create mode 100644 packages/icons/src/icons/Custom/MedicalServicesIcon.tsx diff --git a/packages/icons/src/Icons.stories.mdx b/packages/icons/src/Icons.stories.mdx index 1dc908803..196af56d6 100644 --- a/packages/icons/src/Icons.stories.mdx +++ b/packages/icons/src/Icons.stories.mdx @@ -389,6 +389,7 @@ import ClinicIcon from './icons/Custom/ClinicIcon'; import DeliveredIcon from './icons/Custom/DeliveredIcon'; import DropdownIcon from './icons/Custom/DropdownIcon'; import DrugsIcon from './icons/Custom/DrugsIcon'; +import MedicalServicesIcon from './icons/Custom/MedicalServicesIcon'; import MenuExpandIcon from './icons/Custom/MenuExpandIcon'; import MenuHideIcon from './icons/Custom/MenuHideIcon'; import PendingIcon from './icons/Custom/PendingIcon'; @@ -5404,6 +5405,16 @@ None of the props is required but still you can style all the icons according to hoverIconColor={color('Hover icon color', defaultTheme.icon.colors.hovered.iconColor)} hoverBgColor={color('Hover background color', defaultTheme.icon.colors.hovered.bgColor)} /> + + + + + + + + diff --git a/packages/icons/src/icons/Custom/MedicalServicesIcon.tsx b/packages/icons/src/icons/Custom/MedicalServicesIcon.tsx new file mode 100644 index 000000000..af0808791 --- /dev/null +++ b/packages/icons/src/icons/Custom/MedicalServicesIcon.tsx @@ -0,0 +1,21 @@ +import { WithStyle } from '@medly-components/utils'; +import type { FC } from 'react'; +import { memo } from 'react'; +import MedicalServicesIconSvg from '../../assets/Custom/medical_services_24px.svg'; +import SvgIcon, { SvgIconProps } from '../../SvgIcon'; + +const Component: FC = memo(props => { + const { size, variant, iconColor, bgColor, hoverBgColor, hoverIconColor, withHoverEffect, margin, fillOpacity, ...restProps } = props; + return ( + + + + ); +}); +Component.displayName = 'MedicalServicesIcon'; + +const MedicalServicesIcon: FC & WithStyle = Object.assign(Component, { Style: SvgIcon }); + +export default MedicalServicesIcon; diff --git a/packages/icons/src/icons/File/NoFileIcon.tsx b/packages/icons/src/icons/File/NoFileIcon.tsx index 259e06acf..e914423b8 100644 --- a/packages/icons/src/icons/File/NoFileIcon.tsx +++ b/packages/icons/src/icons/File/NoFileIcon.tsx @@ -1,8 +1,8 @@ import { WithStyle } from '@medly-components/utils'; import type { FC } from 'react'; import { memo } from 'react'; -import SvgIcon, { SvgIconProps } from '../../SvgIcon'; import NoFileIconSvg from '../../assets/File/no_file_24px.svg'; +import SvgIcon, { SvgIconProps } from '../../SvgIcon'; const Component: FC = memo(props => { const { size, variant, iconColor, bgColor, hoverBgColor, hoverIconColor, withHoverEffect, margin, fillOpacity, ...restProps } = props; diff --git a/packages/icons/src/index.ts b/packages/icons/src/index.ts index db5b05c48..c9492209e 100644 --- a/packages/icons/src/index.ts +++ b/packages/icons/src/index.ts @@ -382,6 +382,7 @@ export { default as ClinicIcon } from './icons/Custom/ClinicIcon'; export { default as DeliveredIcon } from './icons/Custom/DeliveredIcon'; export { default as DropdownIcon } from './icons/Custom/DropdownIcon'; export { default as DrugsIcon } from './icons/Custom/DrugsIcon'; +export { default as MedicalServicesIcon } from './icons/Custom/MedicalServicesIcon'; export { default as MenuExpandIcon } from './icons/Custom/MenuExpandIcon'; export { default as MenuHideIcon } from './icons/Custom/MenuHideIcon'; export { default as PendingIcon } from './icons/Custom/PendingIcon'; diff --git a/packages/icons/src/templates/icon.ts b/packages/icons/src/templates/icon.ts index 6d4ddeea0..edcca9027 100644 --- a/packages/icons/src/templates/icon.ts +++ b/packages/icons/src/templates/icon.ts @@ -7,7 +7,9 @@ import SvgIcon, { SvgIconProps } from '../../SvgIcon'; const Component: FC = memo(props => { const { size, variant, iconColor, bgColor, hoverBgColor, hoverIconColor, withHoverEffect, margin, fillOpacity, ...restProps } = props; return ( - + <${iconName}Svg {...restProps} width="1em" height="1em" /> );