@odiaui/icons-react 0.1.0 → 0.3.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/README.md +13 -9
- package/dist/index.cjs +5380 -251
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1282 -64
- package/dist/index.d.ts +1282 -64
- package/dist/index.js +5194 -268
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/rudranboitei/odia-icons/main/public/construction.svg" alt="odiaicons logo construction sheet" width="100%" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# @odiaui/icons-react
|
|
2
6
|
|
|
3
7
|
Free, open-source Odisha icons as typed React components. Every icon is drawn
|
|
4
8
|
on a **24 × 24 grid**, uses `currentColor`, and ships as a tree-shakeable named
|
|
5
9
|
export. MIT licensed.
|
|
6
10
|
|
|
7
|
-
-
|
|
11
|
+
- 240 icons, drawn with Odisha in mind
|
|
8
12
|
- React 18+
|
|
9
13
|
- TypeScript types included
|
|
10
14
|
- ESM and CJS builds
|
|
@@ -31,10 +35,10 @@ bun add @odiaui/icons-react
|
|
|
31
35
|
## Usage
|
|
32
36
|
|
|
33
37
|
```tsx
|
|
34
|
-
import {
|
|
38
|
+
import { Home } from "@odiaui/icons-react";
|
|
35
39
|
|
|
36
40
|
export function Example() {
|
|
37
|
-
return <
|
|
41
|
+
return <Home size={32} className="text-orange-600" />;
|
|
38
42
|
}
|
|
39
43
|
```
|
|
40
44
|
|
|
@@ -42,17 +46,17 @@ Colour comes from `currentColor`, so Tailwind text utilities, CSS `color`, or a
|
|
|
42
46
|
`color` prop all work:
|
|
43
47
|
|
|
44
48
|
```tsx
|
|
45
|
-
<
|
|
49
|
+
<Home size={24} color="#ea580c" />
|
|
46
50
|
```
|
|
47
51
|
|
|
48
52
|
Every component forwards its ref to the underlying `<svg>`:
|
|
49
53
|
|
|
50
54
|
```tsx
|
|
51
55
|
import { useRef } from "react";
|
|
52
|
-
import {
|
|
56
|
+
import { Search } from "@odiaui/icons-react";
|
|
53
57
|
|
|
54
58
|
const ref = useRef<SVGSVGElement>(null);
|
|
55
|
-
<
|
|
59
|
+
<Search ref={ref} size={40} aria-label="Search" />;
|
|
56
60
|
```
|
|
57
61
|
|
|
58
62
|
## Props
|
|
@@ -62,14 +66,14 @@ const ref = useRef<SVGSVGElement>(null);
|
|
|
62
66
|
| `size` | `number \| string` | `24` | Width and height of the icon. |
|
|
63
67
|
| `className` | `string` | — | CSS classes applied to the `<svg>`. |
|
|
64
68
|
| `color` | `string` | `currentColor` inherited | Sets the icon colour. The icon strokes use `currentColor`. |
|
|
65
|
-
| `strokeWidth` | `number \| string` | `
|
|
69
|
+
| `strokeWidth` | `number \| string` | `2` | Stroke width. |
|
|
66
70
|
| `...props` | `React.SVGProps<SVGSVGElement>` | — | Any valid SVG attribute, event handler or accessibility prop. |
|
|
67
71
|
|
|
68
72
|
Component names are the PascalCase form of the SVG filename. For example,
|
|
69
|
-
`
|
|
73
|
+
`home.svg` becomes `Home`:
|
|
70
74
|
|
|
71
75
|
```tsx
|
|
72
|
-
import {
|
|
76
|
+
import { Home } from "@odiaui/icons-react";
|
|
73
77
|
```
|
|
74
78
|
|
|
75
79
|
Browse the full set at [icons.odiaui.xyz/icons](https://icons.odiaui.xyz/icons).
|