viconic-react-icons 1.0.1 → 1.0.2
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/README.md +1 -2
- package/dist/index.js +2 -3
- package/dist/index.mjs +2 -3
- package/index.d.ts +2 -6
- package/package.json +1 -1
- package/src/index.jsx +3 -4
package/README.md
CHANGED
|
@@ -56,7 +56,6 @@ export default App;
|
|
|
56
56
|
| `name` | `string` | `undefined` | **Required.** The unique icon ID (e.g. `lucide:activity`, `h2:0`). |
|
|
57
57
|
| `className` | `string` | `""` | Standard CSS class names (great for Tailwind). |
|
|
58
58
|
| `style` | `React.CSSProperties` | `{}` | Inline CSS styling. |
|
|
59
|
-
| `animate` | `string` | `undefined` | Optional built-in animation keyword. |
|
|
60
59
|
| `...props` | `HTMLAttributes` | | Spread standard HTML attributes (e.g. `onClick`, `title`). |
|
|
61
60
|
|
|
62
61
|
## Architecture
|
|
@@ -68,4 +67,4 @@ Because we fetch SVGs in parallel and cache them across user sessions, your fron
|
|
|
68
67
|
## License
|
|
69
68
|
|
|
70
69
|
This project is licensed under the MIT License. Icon licenses depend on the specific icon families you request.
|
|
71
|
-
|
|
70
|
+
|
package/dist/index.js
CHANGED
|
@@ -1934,19 +1934,18 @@ var import_react = __toESM(require("react"));
|
|
|
1934
1934
|
})();
|
|
1935
1935
|
|
|
1936
1936
|
// src/index.jsx
|
|
1937
|
-
var ViconicIcon = ({ name,
|
|
1937
|
+
var ViconicIcon = ({ name, className, style, ...props }) => {
|
|
1938
1938
|
const iconRef = (0, import_react.useRef)(null);
|
|
1939
1939
|
(0, import_react.useEffect)(() => {
|
|
1940
1940
|
if (window.CopyIcons && iconRef.current) {
|
|
1941
1941
|
window.CopyIcons.forceProcess(iconRef.current);
|
|
1942
1942
|
}
|
|
1943
|
-
}, [name,
|
|
1943
|
+
}, [name, className]);
|
|
1944
1944
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
1945
1945
|
"viconic-icon",
|
|
1946
1946
|
{
|
|
1947
1947
|
ref: iconRef,
|
|
1948
1948
|
icon: name,
|
|
1949
|
-
animate,
|
|
1950
1949
|
class: className,
|
|
1951
1950
|
style,
|
|
1952
1951
|
...props
|
package/dist/index.mjs
CHANGED
|
@@ -1900,19 +1900,18 @@ import React, { useEffect, useRef } from "react";
|
|
|
1900
1900
|
})();
|
|
1901
1901
|
|
|
1902
1902
|
// src/index.jsx
|
|
1903
|
-
var ViconicIcon = ({ name,
|
|
1903
|
+
var ViconicIcon = ({ name, className, style, ...props }) => {
|
|
1904
1904
|
const iconRef = useRef(null);
|
|
1905
1905
|
useEffect(() => {
|
|
1906
1906
|
if (window.CopyIcons && iconRef.current) {
|
|
1907
1907
|
window.CopyIcons.forceProcess(iconRef.current);
|
|
1908
1908
|
}
|
|
1909
|
-
}, [name,
|
|
1909
|
+
}, [name, className]);
|
|
1910
1910
|
return /* @__PURE__ */ React.createElement(
|
|
1911
1911
|
"viconic-icon",
|
|
1912
1912
|
{
|
|
1913
1913
|
ref: iconRef,
|
|
1914
1914
|
icon: name,
|
|
1915
|
-
animate,
|
|
1916
1915
|
class: className,
|
|
1917
1916
|
style,
|
|
1918
1917
|
...props
|
package/index.d.ts
CHANGED
|
@@ -3,14 +3,10 @@ import * as React from 'react';
|
|
|
3
3
|
export interface ViconicIconProps extends React.HTMLAttributes<HTMLElement> {
|
|
4
4
|
/** The unique icon ID (e.g., 'lucide:activity', 'h2:0'). Required. */
|
|
5
5
|
name: string;
|
|
6
|
-
|
|
7
|
-
animate?: string;
|
|
8
|
-
/** Standard CSS class names. */
|
|
9
|
-
className?: string;
|
|
10
|
-
/** Inline CSS styling. */
|
|
6
|
+
|
|
11
7
|
style?: React.CSSProperties;
|
|
12
8
|
}
|
|
13
9
|
|
|
14
10
|
export const ViconicIcon: React.FC<ViconicIconProps>;
|
|
15
11
|
export default ViconicIcon;
|
|
16
|
-
|
|
12
|
+
|
package/package.json
CHANGED
package/src/index.jsx
CHANGED
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
import React, { useEffect, useRef } from 'react';
|
|
2
2
|
import './copyicons-smart-loader.js';
|
|
3
3
|
|
|
4
|
-
export const ViconicIcon = ({ name,
|
|
4
|
+
export const ViconicIcon = ({ name, className, style, ...props }) => {
|
|
5
5
|
const iconRef = useRef(null);
|
|
6
6
|
|
|
7
7
|
useEffect(() => {
|
|
8
8
|
if (window.CopyIcons && iconRef.current) {
|
|
9
9
|
window.CopyIcons.forceProcess(iconRef.current);
|
|
10
10
|
}
|
|
11
|
-
}, [name,
|
|
11
|
+
}, [name, className]);
|
|
12
12
|
|
|
13
13
|
return (
|
|
14
14
|
<viconic-icon
|
|
15
15
|
ref={iconRef}
|
|
16
16
|
icon={name}
|
|
17
|
-
animate={animate}
|
|
18
17
|
class={className}
|
|
19
18
|
style={style}
|
|
20
19
|
{...props}
|
|
@@ -22,4 +21,4 @@ export const ViconicIcon = ({ name, animate, className, style, ...props }) => {
|
|
|
22
21
|
);
|
|
23
22
|
};
|
|
24
23
|
|
|
25
|
-
export default ViconicIcon;
|
|
24
|
+
export default ViconicIcon;
|