From 395d4bc0c153fc6e32e61323856ab171f171ca91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tu=C4=9F=C3=A7e=20K=C3=BC=C3=A7=C3=BCko=C4=9Flu?= Date: Mon, 6 Mar 2023 11:14:59 +0300 Subject: [PATCH] Refactor #3695 --- api-generator/components/button.js | 6 ++++++ components/button/Button.d.ts | 5 +++++ components/button/Button.vue | 7 ++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/api-generator/components/button.js b/api-generator/components/button.js index 198b75c64..359c3d45e 100644 --- a/api-generator/components/button.js +++ b/api-generator/components/button.js @@ -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.' } ]; diff --git a/components/button/Button.d.ts b/components/button/Button.d.ts index 9860f71bf..d4b9da010 100755 --- a/components/button/Button.d.ts +++ b/components/button/Button.d.ts @@ -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; } /** diff --git a/components/button/Button.vue b/components/button/Button.vue index 425d1655e..a60cececc 100755 --- a/components/button/Button.vue +++ b/components/button/Button.vue @@ -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 } ]; },