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

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

View file

@ -114,6 +114,16 @@ export interface InputMaskProps {
* @defaultValue false
*/
readonly?: boolean | undefined;
/**
* When present, it specifies that the component should have invalid state style.
* @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 {InputMaskPassThroughOptions}

View file

@ -1,10 +1,12 @@
import BaseStyle from 'primevue/base/style';
const classes = {
root: ({ instance }) => [
root: ({ props, instance }) => [
'p-inputmask p-inputtext p-component',
{
'p-filled': instance.filled
'p-filled': instance.filled,
'p-invalid': props.invalid,
'p-variant': props.variant === 'filled'
}
]
};