File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff 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 ( [
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ import { IconName } from '../Icon';
33import { ButtonProps } from '../Button' ;
44import { OcBaseProps } from '../OcBase' ;
55import React from 'react' ;
6+ import { IconProps } from '../Icon/Icon.types' ;
67
78export 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'
Original file line number Diff line number Diff 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 */
You can’t perform that action at this time.
0 commit comments