Skip to content

Commit cb17f8a

Browse files
fix: icon: Add iconProps prop support to MdiIcon component (#1005)
* fix: icon: Add iconProps prop support to MdiIcon component * fix: icon: removed iconProps from icon component * fix: icon: removed logs * fix: icon: resolved comment * fix: icon: resolved comment * fix: icon: resolved comment * fix: icon: resolved comment * fix: icon: resolved comment --------- Co-authored-by: ypatadia-eightfold <ypatadia@eightfold.ai>
1 parent 13a6999 commit cb17f8a

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/components/InfoBar/InfoBar.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ export const InfoBar: FC<InfoBarsProps> = React.forwardRef(
3939
gradient = false,
4040
icon,
4141
iconClassNames,
42+
iconProps = {},
4243
locale = enUS,
4344
onClose,
4445
role = 'alert',
@@ -145,6 +146,7 @@ export const InfoBar: FC<InfoBarsProps> = React.forwardRef(
145146
<Icon
146147
path={getIconName()}
147148
classNames={mergeClasses([styles.icon, iconClassNames])}
149+
{...iconProps}
148150
/>
149151
<div
150152
className={mergeClasses([

src/components/InfoBar/InfoBar.types.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { IconName } from '../Icon';
33
import { ButtonProps } from '../Button';
44
import { OcBaseProps } from '../OcBase';
55
import React from 'react';
6+
import { IconProps } from '../Icon/Icon.types';
67

78
export type CloseButtonProps = Omit<ButtonProps, 'onClick' | 'icon'>;
89

@@ -92,6 +93,11 @@ export interface InfoBarsProps
9293
* Custom classes of the icon.
9394
*/
9495
iconClassNames?: string;
96+
/**
97+
* Additional props to be passed to the Icon component.
98+
* These props will be merged with the default icon props.
99+
*/
100+
iconProps?: IconProps;
95101
/**
96102
* The InfoBar locale.
97103
* @default 'enUS'

src/components/Pills/Pills.types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export type closeButtonProps = Omit<
3131
'icon' | 'onClick' | 'size' | 'classNames'
3232
>;
3333

34-
3534
/**
3635
* Props for the pill button shown on right of the label
3736
*/

0 commit comments

Comments
 (0)