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
|
@ -33,6 +33,10 @@ export default {
|
|||
type: String,
|
||||
default: null
|
||||
},
|
||||
variant: {
|
||||
type: String,
|
||||
default: 'outlined'
|
||||
},
|
||||
invalid: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
|
|
5
components/lib/dropdown/Dropdown.d.ts
vendored
5
components/lib/dropdown/Dropdown.d.ts
vendored
|
@ -329,6 +329,11 @@ export interface DropdownProps {
|
|||
* @defaultValue false
|
||||
*/
|
||||
disabled?: boolean | undefined;
|
||||
/**
|
||||
* Specifies the input variant of the component.
|
||||
* @defaultValue outlined
|
||||
*/
|
||||
variant?: 'outlined' | 'filled' | undefined;
|
||||
/**
|
||||
* A property to uniquely identify an option.
|
||||
*/
|
||||
|
|
|
@ -105,6 +105,7 @@ const classes = {
|
|||
{
|
||||
'p-disabled': props.disabled,
|
||||
'p-invalid': props.invalid,
|
||||
'p-variant': props.variant === 'filled',
|
||||
'p-dropdown-clearable': props.showClear,
|
||||
'p-focus': state.focused,
|
||||
'p-inputwrapper-filled': instance.hasSelectedOption,
|
||||
|
@ -123,10 +124,10 @@ const classes = {
|
|||
trigger: 'p-dropdown-trigger',
|
||||
loadingicon: 'p-dropdown-trigger-icon',
|
||||
dropdownIcon: 'p-dropdown-trigger-icon',
|
||||
panel: ({ instance }) => [
|
||||
panel: ({ props, instance }) => [
|
||||
'p-dropdown-panel p-component',
|
||||
{
|
||||
'p-input-filled': instance.$primevue.config.inputStyle === 'filled',
|
||||
'p-input-filled': props.variant === 'filled' || instance.$primevue.config.inputStyle === 'filled',
|
||||
'p-ripple-disabled': instance.$primevue.config.ripple === false
|
||||
}
|
||||
],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue