We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 934c914 commit 7d9c869Copy full SHA for 7d9c869
1 file changed
templates/svg.js
@@ -3,7 +3,7 @@ const propTypesTemplate = (
3
{ tpl }
4
) => {
5
return tpl`import '../style.css';
6
-import { memo, useMemo } from 'react';
+import { memo } from 'react';
7
import { IonIconProps } from '../types';
8
${interfaces}
9
@@ -14,18 +14,7 @@ function ${componentName}({
14
beat,
15
...props
16
}: IonIconProps) {
17
- const animation = useMemo(() => {
18
- if (spin) {
19
- return 'spin';
20
- }
21
-
22
- if (beat) {
23
- return 'beat';
24
25
26
- return '';
27
- }, [spin]);
28
+ const animation = (spin && 'spin') || (beat && 'beat');
29
return ${jsx};
30
}
31
0 commit comments