From ccc1d4f4e09ce0dc9aa133eb62a92ea0ad670e16 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: Fri, 28 Apr 2023 12:45:36 +0300 Subject: [PATCH] Refactor #3889 - For SpeedDial --- components/lib/speeddial/SpeedDial.d.ts | 12 +++++++++++ components/lib/speeddial/SpeedDial.vue | 27 +++++++++++++++++++++---- 2 files changed, 35 insertions(+), 4 deletions(-) diff --git a/components/lib/speeddial/SpeedDial.d.ts b/components/lib/speeddial/SpeedDial.d.ts index f67077ec5..9c20fca4e 100644 --- a/components/lib/speeddial/SpeedDial.d.ts +++ b/components/lib/speeddial/SpeedDial.d.ts @@ -19,6 +19,7 @@ export declare type SpeedDialPassThroughOptionType = SpeedDialPassThroughAttribu export interface SpeedDialPassThroughMethodOptions { props: SpeedDialProps; state: SpeedDialState; + context: SpeedDialContext; } /** @@ -97,6 +98,17 @@ export interface SpeedDialState { focusedOptionIndex: number; } +/** + * Defines current options in SpeedDial component. + */ +export interface SpeedDialContext { + /** + * Current active state of menuitem as a boolean. + * @defaultValue false + */ + active: boolean; +} + /** * Defines tooltip options. * @see {@link SpeedDialProps.tooltipOptions} diff --git a/components/lib/speeddial/SpeedDial.vue b/components/lib/speeddial/SpeedDial.vue index 3f902c6b0..cf272984d 100644 --- a/components/lib/speeddial/SpeedDial.vue +++ b/components/lib/speeddial/SpeedDial.vue @@ -24,7 +24,16 @@