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
|
@ -10,6 +10,10 @@ export default {
|
|||
size: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
invalid: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
style: InputTextStyle,
|
||||
|
|
5
components/lib/inputtext/InputText.d.ts
vendored
5
components/lib/inputtext/InputText.d.ts
vendored
|
@ -91,6 +91,11 @@ export interface InputTextProps extends InputHTMLAttributes {
|
|||
* Defines the size of the component.
|
||||
*/
|
||||
size?: 'small' | 'large' | undefined;
|
||||
/**
|
||||
* When present, it specifies that the component should have invalid state style.
|
||||
* @defaultValue false
|
||||
*/
|
||||
invalid?: boolean | undefined;
|
||||
/**
|
||||
* Used to pass attributes to DOM elements inside the component.
|
||||
* @type {InputTextPassThroughOptions}
|
||||
|
|
|
@ -6,7 +6,8 @@ const classes = {
|
|||
{
|
||||
'p-filled': instance.filled,
|
||||
'p-inputtext-sm': props.size === 'small',
|
||||
'p-inputtext-lg': props.size === 'large'
|
||||
'p-inputtext-lg': props.size === 'large',
|
||||
'p-invalid': props.invalid
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue