-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BREAKING CHANGE(web-react): Rename
message
prop to validationText
…
… in Form Fields #DS-676 ## Migration Guide - Instead of the `message` prop, use `validationText`. - The `validationState` prop is now required when using `validationText`. If `validationState` is not set, `validationText` won't render. - To show a permanent helper, use `helperText`. - `<… validationState="danger" message="error" …>` → `<… validationState="danger" validationText="error" …>` - `<… message="Check this field" …>` → `<… helperText="Check this field" …>` List of affected components: - Checkbox - TextField - TextArea - TextFieldBase - Select Please refer back to these instructions or reach out to our team if you encounter any issues during migration.
- Loading branch information
Showing
30 changed files
with
116 additions
and
127 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
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,21 +1,23 @@ | ||
# ValidationText | ||
# Field | ||
|
||
The validationText subcomponent displays validation messages for Field components like TextField, TextArea, CheckboxField, FileUploader, etc. | ||
## ValidationText | ||
|
||
The ValidationText subcomponent displays validation texts for Field components like TextField, TextArea, CheckboxField, FileUploader, etc. | ||
|
||
```jsx | ||
import { ValidationText } from '@lmc-eu/spirit-web-react/components'; | ||
``` | ||
|
||
```jsx | ||
<ValidationText elementType="div" className="TextField__message" validationText="This field is required" /> | ||
<ValidationText elementType="div" className="TextField__validationText" validationText="This field is required" /> | ||
``` | ||
|
||
## ValidationText | ||
|
||
**Available props** | ||
|
||
| Name | Type | Default | Required | Description | | ||
| ---------------- | -------------------- | ------- | -------- | ------------------------------------------------------------------------------------------------- | | ||
| `elementType` | `span`, `div` | `div` | no | Type of element used as main wrapper (applied only for single validation message, otherwise `ul`) | | ||
| `className` | `string` | - | yes | Wrapper custom class name | | ||
| `validationText` | `string`, `string[]` | - | yes | Validation message | | ||
| Name | Type | Default | Required | Description | | ||
| ---------------- | -------------------- | ------- | -------- | ---------------------------------------------------------------------------------------------- | | ||
| `elementType` | `span`, `div` | `div` | no | Type of element used as main wrapper (applied only for single validation text, otherwise `ul`) | | ||
| `className` | `string` | - | yes | Wrapper custom class name | | ||
| `validationText` | `string`, `string[]` | - | yes | Validation text | |
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
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
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
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
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
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
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
Oops, something went wrong.