mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 00:42:36 +00:00
Fixed #5176 - variant added
This commit is contained in:
parent
d43ea02957
commit
ff22cfe15e
45 changed files with 182 additions and 22 deletions
|
@ -26,6 +26,14 @@ export default {
|
|||
readonly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
invalid: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
variant: {
|
||||
type: String,
|
||||
default: 'outlined'
|
||||
}
|
||||
},
|
||||
style: InputMaskStyle
|
||||
|
|
10
components/lib/inputmask/InputMask.d.ts
vendored
10
components/lib/inputmask/InputMask.d.ts
vendored
|
@ -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}
|
||||
|
|
|
@ -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'
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue