mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Refactor #5176 - invalid property added
This commit is contained in:
parent
b42c9eb7ee
commit
a9a254915c
54 changed files with 198 additions and 12 deletions
|
@ -21,6 +21,10 @@ export default {
|
|||
type: String,
|
||||
default: 'left'
|
||||
},
|
||||
invalid: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
|
|
|
@ -144,6 +144,11 @@ export interface ToggleButtonProps {
|
|||
* @defaultValue left
|
||||
*/
|
||||
iconPos?: 'left' | 'right' | undefined;
|
||||
/**
|
||||
* When present, it specifies that the component should have invalid state style.
|
||||
* @defaultValue false
|
||||
*/
|
||||
invalid?: boolean | undefined;
|
||||
/**
|
||||
* When present, it specifies that the element should be disabled.
|
||||
* @defaultValue false
|
||||
|
|
|
@ -24,7 +24,8 @@ const classes = {
|
|||
'p-togglebutton p-component',
|
||||
{
|
||||
'p-disabled': props.disabled,
|
||||
'p-highlight': instance.active
|
||||
'p-highlight': instance.active,
|
||||
'p-invalid': props.invalid
|
||||
}
|
||||
],
|
||||
input: 'p-togglebutton-input',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue