Fixed #5176 - variant added

This commit is contained in:
tugcekucukoglu 2024-01-31 11:02:53 +03:00
parent d43ea02957
commit ff22cfe15e
45 changed files with 182 additions and 22 deletions

View file

@ -14,6 +14,10 @@ export default {
invalid: {
type: Boolean,
default: false
},
variant: {
type: String,
default: 'outlined'
}
},
style: InputTextStyle,

View file

@ -96,6 +96,11 @@ export interface InputTextProps extends InputHTMLAttributes {
* @defaultValue false
*/
invalid?: boolean | undefined;
/**
* Specifies the input variant of the component.
* @defaultValue outlined
*/
variant?: 'outlined' | 'filled' | undefined;
/**
* Used to pass attributes to DOM elements inside the component.
* @type {InputTextPassThroughOptions}

View file

@ -7,7 +7,8 @@ const classes = {
'p-filled': instance.filled,
'p-inputtext-sm': props.size === 'small',
'p-inputtext-lg': props.size === 'large',
'p-invalid': props.invalid
'p-invalid': props.invalid,
'p-variant': props.variant === 'filled'
}
]
};