Skip to content

Commit a78b7e4

Browse files
author
Greg B
authored
Update RNLineEdit.ts (#293)
LineEdit example
1 parent d1896de commit a78b7e4

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/components/LineEdit/RNLineEdit.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,27 @@ import { ViewProps, setViewProps } from "../View/RNView";
88
import { RNWidget } from "../config";
99
import { throwUnsupported } from "../../utils/helpers";
1010

11+
/**
12+
* The LineEdit component provides ability to add and manipulate native editable text field widgets. It is based on
13+
* [NodeGui's QLineEdit](https://docs.nodegui.org/docs/api/generated/classes/qlineedit).
14+
* ## Example
15+
* ```javascript
16+
* import React from "react";
17+
* import { Renderer, LineEdit, Window } from "@nodegui/react-nodegui";
18+
* const App = () => {
19+
* const handleTextChanged = textValue => {
20+
* console.log(textValue);
21+
* };
22+
* return (
23+
* <Window>
24+
* <LineEdit on={{ textChanged: handleTextChanged }} />
25+
* </Window>
26+
* );
27+
* };
28+
* Renderer.render(<App />);
29+
*
30+
* ```
31+
*/
1132
export interface LineEditProps extends ViewProps<QLineEditSignals> {
1233
text?: string;
1334
placeholderText?: string;

0 commit comments

Comments
 (0)