Skip to content

Commit

Permalink
pass ore attrs to legacy icon
Browse files Browse the repository at this point in the history
  • Loading branch information
onx2 committed Aug 19, 2024
1 parent cd13371 commit c592d43
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions weave-js/src/common/components/elements/LegacyWBIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ export interface LegacyWBIconProps {
style?: any;

'data-test'?: any;

role?: string;
ariaHidden?: string;
ariaLabel?: string;
}

const LegacyWBIconComp = React.forwardRef<HTMLElement, LegacyWBIconProps>(
Expand All @@ -42,6 +46,10 @@ const LegacyWBIconComp = React.forwardRef<HTMLElement, LegacyWBIconProps>(
onMouseLeave,
style,
'data-test': dataTest,
role,
title,
ariaHidden,
ariaLabel,
},
ref
) => {
Expand All @@ -59,6 +67,10 @@ const LegacyWBIconComp = React.forwardRef<HTMLElement, LegacyWBIconProps>(
onMouseLeave,
style,
'data-test': dataTest,
role,
title,
'aria-hidden': ariaHidden,
'aria-label': ariaLabel,
};
if (ref == null) {
return <Icon {...passProps} className={className} />;
Expand Down

0 comments on commit c592d43

Please sign in to comment.