diff --git a/components/lib/speeddial/BaseSpeedDial.vue b/components/lib/speeddial/BaseSpeedDial.vue index 914c1db73..7db145215 100644 --- a/components/lib/speeddial/BaseSpeedDial.vue +++ b/components/lib/speeddial/BaseSpeedDial.vue @@ -57,6 +57,18 @@ export default { tooltipOptions: null, style: null, class: null, + buttonProps: { + type: Object, + default() { + return { rounded: true }; + } + }, + actionButtonProps: { + type: Object, + default() { + return { severity: 'secondary', text: true, rounded: true, size: 'small' }; + } + }, ariaLabelledby: { type: String, default: null diff --git a/components/lib/speeddial/SpeedDial.d.ts b/components/lib/speeddial/SpeedDial.d.ts index a8a389531..d030a0eaa 100644 --- a/components/lib/speeddial/SpeedDial.d.ts +++ b/components/lib/speeddial/SpeedDial.d.ts @@ -9,7 +9,7 @@ */ import { VNode } from 'vue'; import { ComponentHooks } from '../basecomponent'; -import { ButtonPassThroughOptions } from '../button'; +import { ButtonPassThroughOptions, ButtonProps } from '../button'; import { MenuItem } from '../menuitem'; import { PassThroughOptions } from '../passthrough'; import { ClassComponent, DesignToken, GlobalComponentConstructor, PassThrough } from '../ts-helpers'; @@ -87,9 +87,10 @@ export interface SpeedDialPassThroughOptions { */ menuitem?: SpeedDialPassThroughOptionType; /** - * Used to pass attributes to the action's DOM element. + * Used to pass attributes to the action's Button component. + * @see {@link ButtonPassThroughOptions} */ - action?: SpeedDialPassThroughOptionType; + action?: ButtonPassThroughOptions; /** * Used to pass attributes to the action icon's DOM element. */ @@ -266,6 +267,18 @@ export interface SpeedDialProps { * @type {SpeedDialTooltipOptions} */ tooltipOptions?: SpeedDialTooltipOptions; + /** + * Used to pass all properties of the ButtonProps to the button component. + * @type {ButtonProps} + * @defaultValue { rounded: true } + */ + buttonProps?: object | undefined; + /** + * Used to pass all properties of the ButtonProps to the item component. + * @type {ButtonProps} + * @defaultValue { severity: 'secondary', text: true, rounded: true, size: 'small' } + */ + actionButtonProps?: object | undefined; /** * Defines a string value that labels an interactive list element. */ @@ -314,12 +327,21 @@ export interface SpeedDialSlots { * @param {Event} event - Browser event. */ onClick: (event: Event) => void; + /** + * Button click function + * @param {Event} event - Browser event. + */ + toggleCallback: (event: Event) => void; }): VNode[]; /** * Custom button template. * @param {Object} scope - button slot's params. */ button(scope: { + /** + * Visible state of the item + */ + visible: boolean; /** * Button click function * @param {Event} event - Browser event. diff --git a/components/lib/speeddial/SpeedDial.vue b/components/lib/speeddial/SpeedDial.vue index 8d8c8b548..3cbb7ddca 100644 --- a/components/lib/speeddial/SpeedDial.vue +++ b/components/lib/speeddial/SpeedDial.vue @@ -1,49 +1,59 @@