Skip to content
This repository was archived by the owner on Apr 30, 2021. It is now read-only.

Commit 410d907

Browse files
committed
The one with rough v4
1 parent 66e71b5 commit 410d907

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-rough",
3-
"version": "2.0.0",
3+
"version": "2.1.0",
44
"description": "React Bindings for Rough.js",
55
"source": "src/index.tsx",
66
"main": "dist/index.js",
@@ -63,7 +63,7 @@
6363
"peerDependencies": {
6464
"react": "^16.12.0",
6565
"react-dom": "^16.12.0",
66-
"roughjs": "^3.1.0"
66+
"roughjs": "^4.0.1"
6767
},
6868
"config": {
6969
"ghooks": {

src/ReactRough.stories.tsx

+15
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,21 @@ roughStories.add('Basic Line Element', () => {
6868
);
6969
});
7070

71+
roughStories.add('Basic Rectangle Element with a defined seed', () => {
72+
return (
73+
<ReactRough>
74+
<Rectangle
75+
x={number('x', 15)}
76+
y={number('y', 15)}
77+
width={number('width', 80)}
78+
fill={color('color', 'red')}
79+
seed={number('seed', Math.floor(Math.random() * 2 ** 31))} // copied the seed value from rough
80+
height={number('height', 80)}
81+
/>
82+
</ReactRough>
83+
);
84+
});
85+
7186
roughStories.add('Basic Ellipse Element', () => {
7287
return (
7388
<ReactRough>

0 commit comments

Comments
 (0)