File tree 1 file changed +9
-4
lines changed
Filter options
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
53
53
* If defined component will be rendered using 'use' tag.
54
54
*/
55
55
use ?: string
56
+ /**
57
+ * The viewBox attribute defines the position and dimension of an SVG viewport.
58
+ */
59
+ viewBox ?: string
56
60
/**
57
61
* Title tag content.
58
62
*/
@@ -108,8 +112,8 @@ export const CIcon = forwardRef<SVGSVGElement, CIconProps>(
108
112
return _icon
109
113
}
110
114
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 ]
113
117
}
114
118
} , [ change ] )
115
119
@@ -193,8 +197,9 @@ CIcon.propTypes = {
193
197
'8xl' ,
194
198
'9xl' ,
195
199
] ) ,
196
- title : PropTypes . any ,
197
- use : PropTypes . any ,
200
+ title : PropTypes . string ,
201
+ use : PropTypes . string ,
202
+ viewBox : PropTypes . string ,
198
203
width : PropTypes . number ,
199
204
}
200
205
You can’t perform that action at this time.
0 commit comments