This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ui-components: Readme for Input component
- Loading branch information
1 parent
df47a1d
commit d104a83
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
|