From d40aff7cce16bad30b02c5ad32776d5250d21622 Mon Sep 17 00:00:00 2001 From: Kirill Kharitonov Date: Tue, 30 Jan 2024 19:41:33 +0300 Subject: [PATCH] feat: added example to readme file --- src/components/Select/README.md | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/components/Select/README.md b/src/components/Select/README.md index ebbbe02789..98e2a6cf14 100644 --- a/src/components/Select/README.md +++ b/src/components/Select/README.md @@ -974,6 +974,25 @@ const MyComponent = () => { +### Error + +The state of the `Select` in which you want to indicate incorrect user input. To change `Select` appearance, use the `validationState` property with the `"invalid"` value. An optional message text can be added via the `errorMessage` property. By default, message text is rendered outside the component. +This behaviour can be changed with the `errorPlacement` property. + + + + + ## Properties | Name | Description | Type | Default | @@ -1016,3 +1035,6 @@ const MyComponent = () => { | view | Control view | `string` | `'normal'` | | [virtualizationThreshold](#virtualized-list) | The threshold of the options count after which virtualization is enabled | `number` | `50` | | [width](#control-width) | Control width | `string \| number` | `undefined` | +| errorMessage | Error text | `string` | | +| errorPlacement | Error placement | `outside` `inside` | `outside` | +| validationState | Validation state | `"invalid"` | |