-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(*): deprecate and update boolean props [KHCP-9548] (#1793)
* fix(kinput): deprecate hasError prop in favor of error [KHCP-9548] * fix(kdropdown): rename selectionMenu prop [KHCP-9548] * fix(kdropdown): deprecate isDangerous prop [KHCP-9548] * fix(kdropdown): rename danger prop [KHCP-9548] * chore(deps): bump @kong/icons [KHCP-9548] * docs(input): minor fix [KHCP-9548] * fix(*): add console.warn to deprecated props [KHCP-9548] * fix(sandbox): add deprecated props to sandbox [KHCP-9548] * docs(contributing): add toto items [KHCP-9548] * fix(*): address PR feedback [KHCP-9548]
- Loading branch information
Showing
15 changed files
with
130 additions
and
64 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -75,26 +75,26 @@ String to be displayed as help text. | |
<KInput help="I can help with that." placeholder="Need help?" /> | ||
``` | ||
|
||
If [`hasError`](#haserror) is true, the `help` prop text will be styled as error message. | ||
If [`error`](#error) is true, the `help` prop text will be styled as error message. | ||
|
||
<KInput has-error help="I can help with that." /> | ||
<KInput error help="I can help with that." /> | ||
|
||
```html | ||
<KInput has-error help="I can help with that." /> | ||
<KInput error help="I can help with that." /> | ||
``` | ||
|
||
### hasError | ||
### error | ||
|
||
Boolean to indicate whether the element is in an error state and should apply error styling. Defaults to `false`. | ||
|
||
### errorMessage | ||
|
||
String to be displayed as an error message if `hasError` prop is `true`. This prop will supersede the `help` prop if both have a value and `hasError` is `true`. | ||
String to be displayed as an error message if `error` prop is `true`. This prop will supersede the `help` prop if both have a value and `error` is `true`. | ||
|
||
<KInput has-error error-message="Service name should not contain '_'" help="Service name can be anything with only a few exceptions." /> | ||
<KInput error error-message="Service name should not contain '_'" help="Service name can be anything with only a few exceptions." /> | ||
|
||
```html | ||
<KInput has-error error-message="Service name should not contain '_'" help="Service name can be anything with only a few exceptions." /> | ||
<KInput error error-message="Service name should not contain '_'" help="Service name can be anything with only a few exceptions." /> | ||
``` | ||
|
||
### characterLimit | ||
|
@@ -132,7 +132,6 @@ You can pass any input attribute and it will get properly bound to the element. | |
<KInput class="vertical-spacing" disabled model-value="disabled"/> | ||
<KInput class="vertical-spacing" readonly model-value="readonly"/> | ||
<KInput class="vertical-spacing" type="search" model-value="search"/> | ||
<KInput class="vertical-spacing" type="email" model-value="[email protected]"/> | ||
|
||
```html | ||
<KInput placeholder="placeholder" /> | ||
|
@@ -142,7 +141,6 @@ You can pass any input attribute and it will get properly bound to the element. | |
<KInput disabled model-value="disabled"/> | ||
<KInput read-only model-value="read-only"/> | ||
<KInput type="search" model-value="search"/> | ||
<KInput type="email" model-value="[email protected]"/> | ||
``` | ||
|
||
### required | ||
|
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 |
---|---|---|
|
@@ -26,8 +26,8 @@ | |
Edit | ||
</KDropdownItem> | ||
<KDropdownItem | ||
danger | ||
has-divider | ||
is-dangerous | ||
> | ||
Delete | ||
</KDropdownItem> | ||
|
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.