Skip to content

Commit

Permalink
feat: add medical services icon
Browse files Browse the repository at this point in the history
affects: @medly-components/icons
  • Loading branch information
gmukul01 committed Nov 22, 2024
1 parent 079d475 commit 0a6aadd
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 2 deletions.
11 changes: 11 additions & 0 deletions packages/icons/src/Icons.stories.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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)}
/>
<MedicalServicesIcon
size={select('Size', sizes, 'M')}
variant={select('Variant', variants, 'flat')}
disabled={boolean('Disabled', false)}
withHoverEffect={boolean('With hover efect', false)}
iconColor={color('Icon Color', defaultTheme.icon.colors.default.iconColor)}
bgColor={color('Background Color', defaultTheme.icon.colors.default.bgColor)}
hoverIconColor={color('Hover icon color', defaultTheme.icon.colors.hovered.iconColor)}
hoverBgColor={color('Hover background color', defaultTheme.icon.colors.hovered.bgColor)}
/>
<MenuExpandIcon
size={select('Size', sizes, 'M')}
variant={select('Variant', variants, 'flat')}
Expand Down
8 changes: 8 additions & 0 deletions packages/icons/src/assets/Custom/medical_services_24px.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions packages/icons/src/icons/Custom/MedicalServicesIcon.tsx
Original file line number Diff line number Diff line change
@@ -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<SvgIconProps> = memo(props => {
const { size, variant, iconColor, bgColor, hoverBgColor, hoverIconColor, withHoverEffect, margin, fillOpacity, ...restProps } = props;
return (
<SvgIcon
{...{ size, variant, iconColor, bgColor, hoverBgColor, hoverIconColor, withHoverEffect, margin, fillOpacity, ...restProps }}
>
<MedicalServicesIconSvg {...restProps} width="1em" height="1em" />
</SvgIcon>
);
});
Component.displayName = 'MedicalServicesIcon';

const MedicalServicesIcon: FC<SvgIconProps> & WithStyle = Object.assign(Component, { Style: SvgIcon });

export default MedicalServicesIcon;
2 changes: 1 addition & 1 deletion packages/icons/src/icons/File/NoFileIcon.tsx
Original file line number Diff line number Diff line change
@@ -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<SvgIconProps> = memo(props => {
const { size, variant, iconColor, bgColor, hoverBgColor, hoverIconColor, withHoverEffect, margin, fillOpacity, ...restProps } = props;
Expand Down
1 change: 1 addition & 0 deletions packages/icons/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
4 changes: 3 additions & 1 deletion packages/icons/src/templates/icon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import SvgIcon, { SvgIconProps } from '../../SvgIcon';
const Component: FC<SvgIconProps> = memo(props => {
const { size, variant, iconColor, bgColor, hoverBgColor, hoverIconColor, withHoverEffect, margin, fillOpacity, ...restProps } = props;
return (
<SvgIcon {...{ size, variant, iconColor, bgColor, hoverBgColor, hoverIconColor, withHoverEffect, margin, fillOpacity, ...restProps }}>
<SvgIcon
{...{ size, variant, iconColor, bgColor, hoverBgColor, hoverIconColor, withHoverEffect, margin, fillOpacity, ...restProps }}
>
<${iconName}Svg {...restProps} width="1em" height="1em" />
</SvgIcon>
);
Expand Down

0 comments on commit 0a6aadd

Please sign in to comment.