Skip to content

Commit 062a9d2

Browse files
committed
add package.json infos
1 parent cde6c4c commit 062a9d2

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ react-rough-fiber can integrate with many existing SVG-based libraries:
3535
- [Icon](https://react-rough-fiber.amind.app/examples/icon)
3636
- Chart
3737
- [recharts](https://react-rough-fiber.amind.app/examples/chart/recharts)
38-
- [vis](https://react-rough-fiber.amind.app/examples/chart/visx)
38+
- [visx](https://react-rough-fiber.amind.app/examples/chart/visx)
3939
- [react-d3-tree](https://react-rough-fiber.amind.app/examples/chart/react-d3-tree)
4040
- [Text](https://react-rough-fiber.amind.app/examples/text)
4141
- [SVG string](https://react-rough-fiber.amind.app/examples/svg-string)
@@ -57,12 +57,20 @@ import { RoughSVG } from "react-rough-fiber";
5757
```
5858

5959
- containerType = 'div': The type of container to use for the `RoughSVG`. Optional.
60-
- options: RoughOptions | ((shape: SVGShape, props: React.HTMLAttributes<SVGElement>) => RoughOptions = {}. It can be a `RoughOptions` for [Rough.js](https://github.com/rough-stuff/rough/wiki#options). Also support a function that returns `RoughOptions`. Optional
60+
- options: RoughOptions | ((shape: SVGShape, props: React.HTMLAttributes<SVGElement>) => RoughOptions = {}. It can be a `RoughOptions` for [Rough.js](https://github.com/rough-stuff/rough/wiki#options). Also support a function that returns `RoughOptions`. Optional.
6161

6262
### WCRoughSVG
6363

6464
> `WCRoughSVG` is only compatible with React version 18.0.0 or later.
6565
66+
``` jsx
67+
import { WCRoughSVG } from "react-rough-fiber";
68+
// ... your component code
69+
<WCRoughSVG containerType="div" options={options}>
70+
{/* your SVG */}
71+
</WCRoughSVG>
72+
```
73+
6674
If you want to use context in `RoughSVG`, you can use `WCRoughSVG` instead of `RoughSVG`. See [FAQ](https://react-rough-fiber.amind.app/faq) for more details.
6775

6876
All parameters of `WCRoughSVG` are identical to `RoughSVG`.

packages/react-rough-fiber/package.json

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,31 @@
11
{
22
"name": "react-rough-fiber",
3-
"version": "0.0.2",
3+
"version": "0.0.3",
4+
"description": "A React renderer for rendering hand-drawn SVGs.",
5+
"keywords": [
6+
"react",
7+
"react-renderer",
8+
"svg",
9+
"svg-icons",
10+
"hand-drawn",
11+
"roughjs",
12+
"hand-drawn-graphs"
13+
],
14+
"author": "Bowen <zwxdyx@foxmail.com>(https://github.com/Bowen7)",
15+
"bugs": {
16+
"url": "https://github.com/Bowen7/react-rough-fiber/issues"
17+
},
18+
"homepage": "https://react-rough-fiber.amind.app/",
19+
"funding": [
20+
{
21+
"type": "Github Sponsor",
22+
"url": "https://github.com/sponsors/Bowen7"
23+
},
24+
{
25+
"type": "ko-fi",
26+
"url": "https://ko-fi.com/bowen7"
27+
}
28+
],
429
"main": "./src/index.tsx",
530
"license": "MIT",
631
"scripts": {

0 commit comments

Comments
 (0)