File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,10 @@ export interface CIconProps extends Omit<HTMLAttributes<SVGSVGElement>, 'content
5353 * If defined component will be rendered using 'use' tag.
5454 */
5555 use ?: string
56+ /**
57+ * The viewBox attribute defines the position and dimension of an SVG viewport.
58+ */
59+ viewBox ?: string
5660 /**
5761 * Title tag content.
5862 */
@@ -108,8 +112,8 @@ export const CIcon = forwardRef<SVGSVGElement, CIconProps>(
108112 return _icon
109113 }
110114
111- if ( typeof _icon === 'string' && React [ 'icons' ] ) {
112- return React [ 'icons' ] [ iconName as string ]
115+ if ( typeof _icon === 'string' && ( React as { [ key : string ] : any } ) [ 'icons' ] ) {
116+ return ( React as { [ key : string ] : any } ) [ iconName as string ]
113117 }
114118 } , [ change ] )
115119
@@ -193,8 +197,9 @@ CIcon.propTypes = {
193197 '8xl' ,
194198 '9xl' ,
195199 ] ) ,
196- title : PropTypes . any ,
197- use : PropTypes . any ,
200+ title : PropTypes . string ,
201+ use : PropTypes . string ,
202+ viewBox : PropTypes . string ,
198203 width : PropTypes . number ,
199204}
200205
You can’t perform that action at this time.
0 commit comments