Skip to content

Commit e0239fd

Browse files
committed
fix(CToastClose): allow passing a custom component as a prop
1 parent 2f96ef2 commit e0239fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/coreui-vue/src/components/toast/CToastClose.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { defineComponent, h, inject } from 'vue'
1+
import { defineComponent, h, inject, resolveComponent } from 'vue'
22
import { CCloseButton } from '../close-button/CCloseButton'
33

44
type CCloseButtonProps = InstanceType<typeof CCloseButton>['$props']
@@ -32,7 +32,7 @@ const CToastClose = defineComponent({
3232
return () =>
3333
props.as
3434
? h(
35-
props.as,
35+
resolveComponent(props.as),
3636
{
3737
onClick: () => {
3838
handleClose()

0 commit comments

Comments
 (0)