Skip to content

Commit 29b20db

Browse files
author
Greg B
authored
Update RNSpinBox.ts (#292)
SpinBox example
1 parent a78b7e4 commit 29b20db

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

src/components/SpinBox/RNSpinBox.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,29 @@ import { ViewProps, setViewProps } from "../View/RNView";
33
import { RNWidget } from "../config";
44
import { throwUnsupported } from "../../utils/helpers";
55

6+
/**
7+
* The SpinBox component provides the ability to add and manipulate native spin box widgets. It is based on
8+
* [NodeGui's QSpinBox](https://docs.nodegui.org/docs/api/generated/classes/qspinbox/).
9+
* ## Example
10+
* ```javascript
11+
* import React from "react";
12+
* import { Renderer, SpinBox, Window } from "@nodegui/react-nodegui";
13+
* const App = () => {
14+
* const handleValuehanged = {
15+
* valueChanged: (newValue) => {
16+
* console.log(newValue);
17+
* },
18+
* };
19+
* return (
20+
* <Window>
21+
* <SpinBox on={handleValuehanged} value={10} />
22+
* </Window>
23+
* );
24+
* };
25+
* Renderer.render(<App />);
26+
*
27+
* ```
28+
*/
629
export interface SpinBoxProps extends ViewProps<QSpinBoxSignals> {
730
prefix?: string;
831
suffix?: string;

0 commit comments

Comments
 (0)