From 6a3f9a136d4ad4804f36ccb0410144cd300cbbde Mon Sep 17 00:00:00 2001
From: Divyansh Singh <40380293+brc-dd@users.noreply.github.com>
Date: Wed, 21 Jun 2023 09:24:43 +0530
Subject: [PATCH] feat(dropdown): allow passing props to component (#308)
(#309)
close #308
---
lib/components/SDropdownSection.vue | 1 +
lib/components/SDropdownSectionComponent.vue | 7 ++++---
lib/composables/Dropdown.ts | 5 +++--
3 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/lib/components/SDropdownSection.vue b/lib/components/SDropdownSection.vue
index 4dbe76ee..fc4dfead 100644
--- a/lib/components/SDropdownSection.vue
+++ b/lib/components/SDropdownSection.vue
@@ -29,5 +29,6 @@ defineProps<{
diff --git a/lib/components/SDropdownSectionComponent.vue b/lib/components/SDropdownSectionComponent.vue
index 95245f06..d8b7ab82 100644
--- a/lib/components/SDropdownSectionComponent.vue
+++ b/lib/components/SDropdownSectionComponent.vue
@@ -1,11 +1,12 @@
-
+
diff --git a/lib/composables/Dropdown.ts b/lib/composables/Dropdown.ts
index 37bda1ba..e2396272 100644
--- a/lib/composables/Dropdown.ts
+++ b/lib/composables/Dropdown.ts
@@ -1,5 +1,5 @@
import { type MaybeRef, useElementBounding, useWindowSize } from '@vueuse/core'
-import { type Ref } from 'vue'
+import { type Component, type Ref } from 'vue'
import { ref, unref } from 'vue'
export type DropdownSection =
@@ -74,7 +74,8 @@ export interface DropdownSectionActionsOption {
export interface DropdownSectionComponent extends DropdownSectionBase {
type: 'component'
- component: any
+ component: Component
+ props?: Record
}
export interface ManualDropdownPosition {