Refactor #5176 - invalid property added

This commit is contained in:
tugcekucukoglu 2024-01-30 14:27:56 +03:00
parent b42c9eb7ee
commit a9a254915c
54 changed files with 198 additions and 12 deletions

View file

@ -109,6 +109,10 @@ export default {
type: Boolean,
default: false
},
invalid: {
type: Boolean,
default: false
},
disabled: {
type: Boolean,
default: false

View file

@ -262,6 +262,11 @@ export interface InputNumberProps {
* @defaultValue false
*/
highlightOnFocus?: boolean | undefined;
/**
* When present, it specifies that the component should have invalid state style.
* @defaultValue false
*/
invalid?: boolean | undefined;
/**
* When present, it specifies that the component should be disabled.
* @defaultValue false

View file

@ -113,7 +113,8 @@ const classes = {
'p-inputwrapper-focus': instance.focused,
'p-inputnumber-buttons-stacked': props.showButtons && props.buttonLayout === 'stacked',
'p-inputnumber-buttons-horizontal': props.showButtons && props.buttonLayout === 'horizontal',
'p-inputnumber-buttons-vertical': props.showButtons && props.buttonLayout === 'vertical'
'p-inputnumber-buttons-vertical': props.showButtons && props.buttonLayout === 'vertical',
'p-invalid': props.invalid
}
],
input: 'p-inputnumber-input',