Skip to content

Commit 3efc141

Browse files
committed
Added a basic example anyway
1 parent fbcb074 commit 3efc141

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

lib/README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,31 @@ Renders a react knob component that can be widely customised.
88

99
```
1010
npm install @vallsv/rc-knob
11+
pnpm install @vallsv/rc-knob
1112
yarn add @vallsv/rc-knob
1213
```
1314

14-
## Examples
15+
## Basic example
16+
17+
```
18+
import { Knob, Pointer, Arc } from '@vallsv/rc-knob';
19+
20+
export default function Example() {
21+
return <Knob
22+
size={100}
23+
angleOffset={225}
24+
angleRange={270}
25+
value={33}
26+
min={0}
27+
max={100}
28+
>
29+
<Arc arcWidth={5} color="#FC5A96" background="#CCCCCC" />
30+
<Pointer width={5} height={40} radius={10} type="rect" color="#FC5A96" />
31+
</Knob>
32+
}
33+
```
34+
35+
## Documentation and examples
1536

1637
- https://vallsv.github.io/rc-knob/
1738
- https://eskimoblood.github.io/rc-knob/ (older version)

0 commit comments

Comments
 (0)