viconic-react-icons 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/src/index.jsx ADDED
@@ -0,0 +1,25 @@
1
+ import React, { useEffect, useRef } from 'react';
2
+ import './copyicons-smart-loader.js';
3
+
4
+ export const ViconicIcon = ({ name, animate, className, style, ...props }) => {
5
+ const iconRef = useRef(null);
6
+
7
+ useEffect(() => {
8
+ if (window.CopyIcons && iconRef.current) {
9
+ window.CopyIcons.forceProcess(iconRef.current);
10
+ }
11
+ }, [name, animate, className]);
12
+
13
+ return (
14
+ <viconic-icon
15
+ ref={iconRef}
16
+ icon={name}
17
+ animate={animate}
18
+ class={className}
19
+ style={style}
20
+ {...props}
21
+ ></viconic-icon>
22
+ );
23
+ };
24
+
25
+ export default ViconicIcon;