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

@ -20,6 +20,10 @@ export default {
type: Boolean,
default: true
},
invalid: {
type: Boolean,
default: false
},
disabled: Boolean,
dataKey: null,
ariaLabelledby: {

View file

@ -153,6 +153,11 @@ export interface SelectButtonProps {
* @defaultValue false
*/
multiple?: 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 element should be disabled.
* @defaultValue false

View file

@ -1,7 +1,13 @@
import BaseStyle from 'primevue/base/style';
const classes = {
root: ({ props }) => ['p-selectbutton p-buttonset p-component', { 'p-disabled': props.disabled }],
root: ({ props }) => [
'p-selectbutton p-buttonset p-component',
{
'p-disabled': props.disabled,
'p-invalid': props.invalid
}
],
button: ({ instance, option }) => [
'p-button p-component',
{