pull/3711/head
Tuğçe Küçükoğlu 2023-03-06 11:14:59 +03:00
parent 62ede9acb9
commit 395d4bc0c1
3 changed files with 17 additions and 1 deletions

View File

@ -88,6 +88,12 @@ const ButtonProps = [
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Defines the size of the button, valid values are "small" and "large".' 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.'
} }
]; ];

View File

@ -90,6 +90,11 @@ export interface ButtonProps extends ButtonHTMLAttributes {
* Defines the size of the button. * Defines the size of the button.
*/ */
size?: 'small' | 'large' | undefined; size?: 'small' | 'large' | undefined;
/**
* Add a plain textual class to the button without a background initially.
* @defaultValue false
*/
plain?: boolean | undefined;
} }
/** /**

View File

@ -74,6 +74,10 @@ export default {
size: { size: {
type: String, type: String,
default: null default: null
},
plain: {
type: Boolean,
default: false
} }
}, },
computed: { computed: {
@ -93,7 +97,8 @@ export default {
'p-button-text': this.text, 'p-button-text': this.text,
'p-button-outlined': this.outlined, 'p-button-outlined': this.outlined,
'p-button-sm': this.size === 'small', 'p-button-sm': this.size === 'small',
'p-button-lg': this.size === 'large' 'p-button-lg': this.size === 'large',
'p-button-plain': this.plain
} }
]; ];
}, },