Split button style and class props removed

pull/3471/head
Bahadır Sofuoğlu 2023-01-09 21:58:39 +03:00
parent 3825bf7c60
commit 43cfae465d
4 changed files with 3 additions and 89 deletions

View File

@ -53,35 +53,11 @@ const SplitButtonProps = [
default: 'null', default: 'null',
description: 'Inline of the component.' description: 'Inline of the component.'
}, },
{
name: 'buttonClass',
type: 'string',
default: 'null',
description: 'Style class of the button.'
},
{ {
name: 'menuButtonIcon', name: 'menuButtonIcon',
type: 'string', type: 'string',
default: 'null', default: 'null',
description: 'Name of the menu button icon.' 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.'
} }
]; ];

View File

@ -53,26 +53,10 @@ export interface SplitButtonProps {
* Uses to pass all properties of the HTMLButtonElement to the menu button. * Uses to pass all properties of the HTMLButtonElement to the menu button.
*/ */
menuButtonProps?: ButtonHTMLAttributes | undefined; menuButtonProps?: ButtonHTMLAttributes | undefined;
/**
* Style class of the button.
*/
buttonClass?: string | undefined;
/** /**
* Name of the menu button icon. * Name of the menu button icon.
*/ */
menuButtonIcon?: string | undefined; 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 { export interface SplitButtonSlots {

View File

@ -1,12 +1,12 @@
<template> <template>
<div :class="containerClass" :style="style"> <div :class="containerClass" :style="style">
<slot> <slot>
<PVSButton type="button" :class="buttonClasses" :icon="icon" :label="label" :disabled="disabled" :aria-label="label" @click="onDefaultButtonClick" v-bind="buttonProps" /> <PVSButton type="button" class="p-splitbutton-defaultbutton" :icon="icon" :label="label" :disabled="disabled" :aria-label="label" @click="onDefaultButtonClick" v-bind="buttonProps" />
</slot> </slot>
<PVSButton <PVSButton
ref="button" ref="button"
type="button" type="button"
:class="menuButtonClasses" class="p-splitbutton-menubutton"
:icon="menuButtonIcon" :icon="menuButtonIcon"
:disabled="disabled" :disabled="disabled"
aria-haspopup="true" aria-haspopup="true"
@ -16,7 +16,7 @@
@keydown="onDropdownKeydown" @keydown="onDropdownKeydown"
v-bind="menuButtonProps" v-bind="menuButtonProps"
/> />
<PVSMenu ref="menu" :id="ariaId + '_overlay'" :model="model" :popup="true" :autoZIndex="autoZIndex" :baseZIndex="baseZIndex" :appendTo="appendTo" :style="menuStyle" :class="menuClass" /> <PVSMenu ref="menu" :id="ariaId + '_overlay'" :model="model" :popup="true" :autoZIndex="autoZIndex" :baseZIndex="baseZIndex" :appendTo="appendTo" />
</div> </div>
</template> </template>
@ -68,10 +68,6 @@ export default {
type: null, type: null,
default: null default: null
}, },
buttonClass: {
type: String,
default: null
},
menuButtonProps: { menuButtonProps: {
type: null, type: null,
default: null default: null
@ -79,18 +75,6 @@ export default {
menuButtonIcon: { menuButtonIcon: {
type: String, type: String,
default: 'pi pi-chevron-down' default: 'pi pi-chevron-down'
},
menuButtonClass: {
type: String,
default: null
},
menuClass: {
type: String,
default: null
},
menuStyle: {
type: null,
default: null
} }
}, },
data() { data() {
@ -119,12 +103,6 @@ export default {
}, },
containerClass() { containerClass() {
return ['p-splitbutton p-component', this.class]; return ['p-splitbutton p-component', this.class];
},
menuButtonClasses() {
return ['p-splitbutton-menubutton', this.menuButtonClass];
},
buttonClasses() {
return ['p-splitbutton-defaultbutton', this.buttonClass];
} }
}, },
components: { components: {

View File

@ -182,36 +182,12 @@ export default {
<td>null</td> <td>null</td>
<td>Uses to pass all properties of the HTMLButtonElement to the menu button.</td> <td>Uses to pass all properties of the HTMLButtonElement to the menu button.</td>
</tr> </tr>
<tr>
<td>buttonClass</td>
<td>string</td>
<td>null</td>
<td>Style class of the button.</td>
</tr>
<tr> <tr>
<td>menuButtonIcon</td> <td>menuButtonIcon</td>
<td>string</td> <td>string</td>
<td>null</td> <td>null</td>
<td>Name of the menu button icon.</td> <td>Name of the menu button icon.</td>
</tr> </tr>
<tr>
<td>menuButtonClass</td>
<td>string</td>
<td>null</td>
<td>Style class of the menu button.</td>
</tr>
<tr>
<td>menuClass</td>
<td>string</td>
<td>null</td>
<td>Style class of the menu.</td>
</tr>
<tr>
<td>menuStyle</td>
<td>any</td>
<td>null</td>
<td>Inline style of the menu.</td>
</tr>
</tbody> </tbody>
</table> </table>
</div> </div>