Skip to content

Commit adccea6

Browse files
committed
feat: added ability to pass attributes to popup
1 parent a9ba47a commit adccea6

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/components/LibPopup/LibPopup.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
backdrop:bg-transparent
1414
`,
1515
16+
attrs.class
1617
)"
18+
v-bind="{...attrs, class:undefined}"
1719
:is="useBackdrop ? 'dialog' : 'div'"
1820
ref="dialogEl"
1921
@mousedown="useBackdrop ? mousedown = true : undefined"
@@ -43,6 +45,7 @@ const props = defineProps({
4345
preferredHorizontal: { type: Array as PropType<("center" | "right" | "left" | "either")[]>, default: () => ["center", "right", "left", "either"]},
4446
preferredVertical: { type: Array as PropType<("top" | "bottom" | "either")[]>, default: () => ["top", "bottom", "either"]},
4547
})
48+
const attrs = useAttrs()
4649
defineOptions({ name: "lib-popup" })
4750
4851
// todo, can we have transitions?

0 commit comments

Comments
 (0)