Skip to content

Commit

Permalink
fix(CToastClose): allow passing a custom component as a prop
Browse files Browse the repository at this point in the history
  • Loading branch information
mrholek committed Sep 15, 2024
1 parent 2f96ef2 commit e0239fd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/coreui-vue/src/components/toast/CToastClose.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { defineComponent, h, inject } from 'vue'
import { defineComponent, h, inject, resolveComponent } from 'vue'
import { CCloseButton } from '../close-button/CCloseButton'

type CCloseButtonProps = InstanceType<typeof CCloseButton>['$props']
Expand Down Expand Up @@ -32,7 +32,7 @@ const CToastClose = defineComponent({
return () =>
props.as
? h(
props.as,
resolveComponent(props.as),
{
onClick: () => {
handleClose()
Expand Down

0 comments on commit e0239fd

Please sign in to comment.