r3d-icons 1.1.16 → 1.1.18
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 +20 -0
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +55 -1
- package/dist/index.d.ts +55 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -59,6 +59,26 @@ export default App;
|
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
62
|
+
## TypeScript Support & Type-only Imports
|
|
63
|
+
|
|
64
|
+
The library provides strict TypeScript definitions for all component parameters. You can import type interfaces directly, including type-only imports to preserve a minimal runtime bundle footprint:
|
|
65
|
+
|
|
66
|
+
```typescript
|
|
67
|
+
import { ShieldIcon } from "react-3d-icons";
|
|
68
|
+
import type { ShieldIconProps, IconPreset } from "react-3d-icons";
|
|
69
|
+
|
|
70
|
+
const config: ShieldIconProps = {
|
|
71
|
+
preset: "glassmorphism", // strictly validated literal presets
|
|
72
|
+
color: "#4f46e5"
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
export default function Card() {
|
|
76
|
+
return <ShieldIcon {...config} />;
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
62
82
|
## API Properties Reference
|
|
63
83
|
|
|
64
84
|
Every icon component accepts the following customizable props:
|