|
@@ -89,8 +89,8 @@ const EditIcon = ({ text, type, color, position, onClick }) => {
|
89
|
89
|
const color2 = color || icon.color || '#ff925c';
|
90
|
90
|
const position2 = position || icon.pos;
|
91
|
91
|
|
92
|
|
- const wrappedStyle = useMemo(() => ({ color: `${color2}`, display: 'flex', alignItems: 'center', cursor: 'pointer' }), [color]);
|
93
|
|
- const iconStyle = useMemo(() => ({ display: 'inline-block', marginLeft: '6px', background: `url(${spriteImg}) 0 ${position2}px / 100% 1300% no-repeat`, width: '18px', height: '18px' }), [position])
|
|
92
|
+ const wrappedStyle = useMemo(() => ({ color: `${color2}`, display: 'flex', alignItems: 'center', cursor: 'pointer' }), [type, color]);
|
|
93
|
+ const iconStyle = useMemo(() => ({ display: 'inline-block', marginLeft: '6px', background: `url(${spriteImg}) 0 ${position2}px / 100% 1300% no-repeat`, width: '18px', height: '18px' }), [type, position])
|
94
|
94
|
|
95
|
95
|
return (
|
96
|
96
|
<span style={wrappedStyle} onClick={onClick || noop} >
|