From 2b394eab25ac3fd5d0d16459935004940eecc4c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Keviin=20=C3=85berg=20Kultalahti?= Date: Mon, 26 Apr 2021 14:14:05 +0200 Subject: [PATCH] add closeOnClick slot prop to ActionMenu --- packages/bbui/src/ActionMenu/ActionMenu.svelte | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/bbui/src/ActionMenu/ActionMenu.svelte b/packages/bbui/src/ActionMenu/ActionMenu.svelte index f64e303cd0..26da96c6e6 100644 --- a/packages/bbui/src/ActionMenu/ActionMenu.svelte +++ b/packages/bbui/src/ActionMenu/ActionMenu.svelte @@ -16,6 +16,11 @@ export const show = () => { dropdown.show() } + + const closeOnClickWrapper = (cb) => { + dropdown.hide() + cb() + }
@@ -23,7 +28,7 @@
- +