Skip to content

Commit

Permalink
Document focus prop
Browse files Browse the repository at this point in the history
  • Loading branch information
vadimdemedes committed Feb 3, 2022
1 parent 331c093 commit e3f12a9
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ $ npm install ink-text-input
## Usage

```jsx
import React, { useState } from 'react';
import { render, Box, Text } from 'ink';
import React, {useState} from 'react';
import {render, Box, Text} from 'ink';
import TextInput from 'ink-text-input';

const SearchQuery = () => {
Expand Down Expand Up @@ -50,6 +50,13 @@ Type: `string`

Text to display when `value` is empty.

### focus

Type: `boolean` \
Default: `true`

Listen to user's input. Useful in case there are multiple input components at the same time and input must be "routed" to a specific component.

### showCursor

Type: `boolean`\
Expand Down Expand Up @@ -93,8 +100,8 @@ This component also exposes an [uncontrolled](https://reactjs.org/docs/uncontrol

```jsx
import React from 'react';
import { render, Box, Text } from 'ink';
import { UncontrolledTextInput } from 'ink-text-input';
import {render, Box, Text} from 'ink';
import {UncontrolledTextInput} from 'ink-text-input';

const SearchQuery = () => {
const handleSubmit = query => {
Expand Down

0 comments on commit e3f12a9

Please sign in to comment.