mirror of
https://github.com/primefaces/primevue.git
synced 2025-05-09 08:52:34 +00:00
Refactor #3695
This commit is contained in:
parent
62ede9acb9
commit
395d4bc0c1
3 changed files with 17 additions and 1 deletions
|
@ -88,6 +88,12 @@ const ButtonProps = [
|
|||
type: 'string',
|
||||
default: 'null',
|
||||
description: 'Defines the size of the button, valid values are "small" and "large".'
|
||||
},
|
||||
{
|
||||
name: 'plain',
|
||||
type: 'boolean',
|
||||
default: 'false',
|
||||
description: 'Add a plain textual class to the button without a background initially.'
|
||||
}
|
||||
];
|
||||
|
||||
|
|
5
components/button/Button.d.ts
vendored
5
components/button/Button.d.ts
vendored
|
@ -90,6 +90,11 @@ export interface ButtonProps extends ButtonHTMLAttributes {
|
|||
* Defines the size of the button.
|
||||
*/
|
||||
size?: 'small' | 'large' | undefined;
|
||||
/**
|
||||
* Add a plain textual class to the button without a background initially.
|
||||
* @defaultValue false
|
||||
*/
|
||||
plain?: boolean | undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,6 +74,10 @@ export default {
|
|||
size: {
|
||||
type: String,
|
||||
default: null
|
||||
},
|
||||
plain: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
@ -93,7 +97,8 @@ export default {
|
|||
'p-button-text': this.text,
|
||||
'p-button-outlined': this.outlined,
|
||||
'p-button-sm': this.size === 'small',
|
||||
'p-button-lg': this.size === 'large'
|
||||
'p-button-lg': this.size === 'large',
|
||||
'p-button-plain': this.plain
|
||||
}
|
||||
];
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue