Skip to content
This repository has been archived by the owner on Jan 23, 2025. It is now read-only.

Commit

Permalink
ui-components: Readme for Input component
Browse files Browse the repository at this point in the history
  • Loading branch information
koorosh authored and nathanstilwell committed Jun 3, 2020
1 parent df47a1d commit d104a83
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions packages/ui-components/src/Input/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[back to components](../README.md)

# Input components

Provides `<TextInput />` and `<NumberInput />` realizations and `<BaseInput />`
unstyled base component to build own custom input components.

## Properties
### `initialValue?: string | number`
Value to be displayed if no `value` is provided or nothing is entered by user.
### `value?: string | number`
Value to be displayed in input element
### `onChange?: (value: string | number) => void;`
Handler to be called when input value is changed by user
### `placeholder?: string;`
Placeholder to be shown when no value is present
### `disabled?: boolean;`
Disable input
### `invalid?: boolean;`
Highlight input element with red borders to indicate that entered value is not acceptable.
### `prefixIcon?: ReactNode`
Expects one of SVG icons (`@cockroachlabs/icons`) to be provided.


0 comments on commit d104a83

Please sign in to comment.