From 3825bf7c600f77e3cc409ae0f8b97c220e0f6dd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Mon, 2 Jan 2023 11:40:36 +0300 Subject: [PATCH 1/2] Button class style and dropdown icon customization --- api-generator/components/splitbutton.js | 36 +++++++++++++++++++++++++ components/splitbutton/SplitButton.d.ts | 20 ++++++++++++++ components/splitbutton/SplitButton.vue | 34 ++++++++++++++++++++--- pages/splitbutton/SplitButtonDoc.vue | 30 +++++++++++++++++++++ 4 files changed, 116 insertions(+), 4 deletions(-) diff --git a/api-generator/components/splitbutton.js b/api-generator/components/splitbutton.js index 8fc5ec1bf..1a5c40dcc 100644 --- a/api-generator/components/splitbutton.js +++ b/api-generator/components/splitbutton.js @@ -35,6 +35,12 @@ const SplitButtonProps = [ default: 'body', description: 'A valid query selector or an HTMLElement to specify where the overlay gets attached.' }, + { + name: 'disabled', + type: 'boolean', + default: 'false', + description: 'When present, it specifies that the element should be disabled.' + }, { name: 'class', type: 'string', @@ -46,6 +52,36 @@ const SplitButtonProps = [ type: 'any', default: 'null', description: 'Inline of the component.' + }, + { + name: 'buttonClass', + type: 'string', + default: 'null', + description: 'Style class of the button.' + }, + { + name: 'menuButtonIcon', + type: 'string', + default: 'null', + description: 'Name of the menu button icon.' + }, + { + name: 'menuButtonClass', + type: 'string', + default: 'null', + description: 'Style class of the menu button.' + }, + { + name: 'menuClass', + type: 'string', + default: 'null', + description: 'Style class of the menu.' + }, + { + name: 'menuStyle', + type: 'any', + default: 'null', + description: 'Inline style of the menu.' } ]; diff --git a/components/splitbutton/SplitButton.d.ts b/components/splitbutton/SplitButton.d.ts index 64f479a20..bab84671e 100755 --- a/components/splitbutton/SplitButton.d.ts +++ b/components/splitbutton/SplitButton.d.ts @@ -53,6 +53,26 @@ export interface SplitButtonProps { * Uses to pass all properties of the HTMLButtonElement to the menu button. */ menuButtonProps?: ButtonHTMLAttributes | undefined; + /** + * Style class of the button. + */ + buttonClass?: string | undefined; + /** + * Name of the menu button icon. + */ + menuButtonIcon?: string | undefined; + /** + * Style class of the menu button. + */ + menuButtonClass?: string | undefined; + /** + * Style class of the menu. + */ + menuClass?: string | undefined; + /** + * Inline style of the menu. + */ + menuStyle?: any | undefined; } export interface SplitButtonSlots { diff --git a/components/splitbutton/SplitButton.vue b/components/splitbutton/SplitButton.vue index edb5a174f..6d4d59192 100755 --- a/components/splitbutton/SplitButton.vue +++ b/components/splitbutton/SplitButton.vue @@ -1,13 +1,13 @@ @@ -68,9 +68,29 @@ export default { type: null, default: null }, + buttonClass: { + type: String, + default: null + }, menuButtonProps: { type: null, default: null + }, + menuButtonIcon: { + type: String, + default: 'pi pi-chevron-down' + }, + menuButtonClass: { + type: String, + default: null + }, + menuClass: { + type: String, + default: null + }, + menuStyle: { + type: null, + default: null } }, data() { @@ -99,6 +119,12 @@ export default { }, containerClass() { return ['p-splitbutton p-component', this.class]; + }, + menuButtonClasses() { + return ['p-splitbutton-menubutton', this.menuButtonClass]; + }, + buttonClasses() { + return ['p-splitbutton-defaultbutton', this.buttonClass]; } }, components: { diff --git a/pages/splitbutton/SplitButtonDoc.vue b/pages/splitbutton/SplitButtonDoc.vue index 5bac82abc..9ec855d6a 100755 --- a/pages/splitbutton/SplitButtonDoc.vue +++ b/pages/splitbutton/SplitButtonDoc.vue @@ -182,6 +182,36 @@ export default { null Uses to pass all properties of the HTMLButtonElement to the menu button. + + buttonClass + string + null + Style class of the button. + + + menuButtonIcon + string + null + Name of the menu button icon. + + + menuButtonClass + string + null + Style class of the menu button. + + + menuClass + string + null + Style class of the menu. + + + menuStyle + any + null + Inline style of the menu. + From 43cfae465d0d7ffe0d675d2518d2c42442f77710 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bahad=C4=B1r=20Sofuo=C4=9Flu?= Date: Mon, 9 Jan 2023 21:58:39 +0300 Subject: [PATCH 2/2] Split button style and class props removed --- api-generator/components/splitbutton.js | 24 --------------------- components/splitbutton/SplitButton.d.ts | 16 -------------- components/splitbutton/SplitButton.vue | 28 +++---------------------- pages/splitbutton/SplitButtonDoc.vue | 24 --------------------- 4 files changed, 3 insertions(+), 89 deletions(-) diff --git a/api-generator/components/splitbutton.js b/api-generator/components/splitbutton.js index 1a5c40dcc..ab16eccd3 100644 --- a/api-generator/components/splitbutton.js +++ b/api-generator/components/splitbutton.js @@ -53,35 +53,11 @@ const SplitButtonProps = [ default: 'null', description: 'Inline of the component.' }, - { - name: 'buttonClass', - type: 'string', - default: 'null', - description: 'Style class of the button.' - }, { name: 'menuButtonIcon', type: 'string', default: 'null', description: 'Name of the menu button icon.' - }, - { - name: 'menuButtonClass', - type: 'string', - default: 'null', - description: 'Style class of the menu button.' - }, - { - name: 'menuClass', - type: 'string', - default: 'null', - description: 'Style class of the menu.' - }, - { - name: 'menuStyle', - type: 'any', - default: 'null', - description: 'Inline style of the menu.' } ]; diff --git a/components/splitbutton/SplitButton.d.ts b/components/splitbutton/SplitButton.d.ts index bab84671e..74bc561fe 100755 --- a/components/splitbutton/SplitButton.d.ts +++ b/components/splitbutton/SplitButton.d.ts @@ -53,26 +53,10 @@ export interface SplitButtonProps { * Uses to pass all properties of the HTMLButtonElement to the menu button. */ menuButtonProps?: ButtonHTMLAttributes | undefined; - /** - * Style class of the button. - */ - buttonClass?: string | undefined; /** * Name of the menu button icon. */ menuButtonIcon?: string | undefined; - /** - * Style class of the menu button. - */ - menuButtonClass?: string | undefined; - /** - * Style class of the menu. - */ - menuClass?: string | undefined; - /** - * Inline style of the menu. - */ - menuStyle?: any | undefined; } export interface SplitButtonSlots { diff --git a/components/splitbutton/SplitButton.vue b/components/splitbutton/SplitButton.vue index 6d4d59192..55359258b 100755 --- a/components/splitbutton/SplitButton.vue +++ b/components/splitbutton/SplitButton.vue @@ -1,12 +1,12 @@ @@ -68,10 +68,6 @@ export default { type: null, default: null }, - buttonClass: { - type: String, - default: null - }, menuButtonProps: { type: null, default: null @@ -79,18 +75,6 @@ export default { menuButtonIcon: { type: String, default: 'pi pi-chevron-down' - }, - menuButtonClass: { - type: String, - default: null - }, - menuClass: { - type: String, - default: null - }, - menuStyle: { - type: null, - default: null } }, data() { @@ -119,12 +103,6 @@ export default { }, containerClass() { return ['p-splitbutton p-component', this.class]; - }, - menuButtonClasses() { - return ['p-splitbutton-menubutton', this.menuButtonClass]; - }, - buttonClasses() { - return ['p-splitbutton-defaultbutton', this.buttonClass]; } }, components: { diff --git a/pages/splitbutton/SplitButtonDoc.vue b/pages/splitbutton/SplitButtonDoc.vue index 9ec855d6a..d3426b673 100755 --- a/pages/splitbutton/SplitButtonDoc.vue +++ b/pages/splitbutton/SplitButtonDoc.vue @@ -182,36 +182,12 @@ export default { null Uses to pass all properties of the HTMLButtonElement to the menu button. - - buttonClass - string - null - Style class of the button. - menuButtonIcon string null Name of the menu button icon. - - menuButtonClass - string - null - Style class of the menu button. - - - menuClass - string - null - Style class of the menu. - - - menuStyle - any - null - Inline style of the menu. -