@@ -24,10 +24,10 @@ export interface CreateIconProps {
2424export interface SVGIconProps extends Omit < React . HTMLProps < SVGElement > , 'ref' > {
2525 title ?: string ;
2626 className ?: string ;
27- /* Indicates the icon should render using alternate svg data for unified theme */
27+ /** Indicates the icon should render using alternate svg data for the unified theme */
2828 set ?: 'default' | 'rh-ui' ;
29- /** Applicable to RH standard icons only. Indicates the icon should render without the standard set styling. */
30- noStandardSetStyling ?: boolean ;
29+ /** Indicates the icon should render without its default styling specified in its IconDefinition.svgClassName . */
30+ noDefaultStyle ?: boolean ;
3131}
3232
3333let currentId = 0 ;
@@ -73,15 +73,15 @@ export function createIcon({ name, icon, rhUiIcon = null }: CreateIconProps): Re
7373 id = `icon-title-${ currentId ++ } ` ;
7474
7575 static defaultProps : SVGIconProps = {
76- noStandardSetStyling : false
76+ noDefaultStyle : false
7777 } ;
7878
7979 constructor ( props : SVGIconProps ) {
8080 super ( props ) ;
8181 }
8282
8383 render ( ) {
84- const { title, className : propsClassName , set, noStandardSetStyling , ...props } = this . props ;
84+ const { title, className : propsClassName , set, noDefaultStyle , ...props } = this . props ;
8585
8686 const hasTitle = Boolean ( title ) ;
8787 const classNames = [ 'pf-v6-svg' ] ;
@@ -104,14 +104,8 @@ export function createIcon({ name, icon, rhUiIcon = null }: CreateIconProps): Re
104104 const _yOffset = yOffset ?? 0 ;
105105 const viewBox = [ _xOffset , _yOffset , width , height ] . join ( ' ' ) ;
106106
107- if ( svgClassName ) {
108- if ( svgClassName !== 'pf-v6-icon-rh-standard' ) {
109- classNames . push ( svgClassName ) ;
110- } else {
111- if ( ! noStandardSetStyling ) {
112- classNames . push ( svgClassName ) ;
113- }
114- }
107+ if ( svgClassName && ! noDefaultStyle ) {
108+ classNames . push ( svgClassName ) ;
115109 }
116110
117111 const svgPaths =
0 commit comments