File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export const Icon = memo(
5656 props : CubeIconProps ,
5757 ref : ForwardedRef < HTMLSpanElement > ,
5858 ) {
59- const { size, stroke, ...rest } = props ;
59+ let { size, styles , stroke, ...rest } = props ;
6060
6161 const icon = rest . children
6262 ? cloneElement ( rest . children , {
@@ -65,13 +65,21 @@ export const Icon = memo(
6565 } )
6666 : rest . children ;
6767
68+ if ( size ) {
69+ styles = {
70+ ...styles ,
71+ fontSize : size ,
72+ } ;
73+ }
74+ if ( stroke ) {
75+ styles = {
76+ ...styles ,
77+ '@stroke-width' : stroke ,
78+ } ;
79+ }
80+
6881 return (
69- < IconElement
70- ref = { ref }
71- qa = "Icon"
72- { ...rest }
73- styles = { size ? { fontSize : size , ...rest . styles } : rest . styles }
74- >
82+ < IconElement ref = { ref } qa = "Icon" { ...rest } styles = { styles } >
7583 { icon }
7684 </ IconElement >
7785 ) ;
You can’t perform that action at this time.
0 commit comments