Skip to content

Commit

Permalink
fix: (issue #165) add type RouteLocationRaw for prop "to"
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgoud committed Aug 3, 2023
1 parent 8aecf06 commit 7bf80c5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion packages/components/button/src/button.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { buildProps } from '@puik/utils'
import type { RouteLocationRaw } from 'vue-router'
import type { ExtractPropTypes, PropType } from 'vue'
import type Button from './button.vue'

Expand Down Expand Up @@ -51,7 +52,7 @@ export const buttonProps = buildProps({
default: '',
},
to: {
type: String,
type: [Object, String] as PropType<RouteLocationRaw>,
required: false,
default: undefined,
},
Expand Down
5 changes: 3 additions & 2 deletions packages/components/sidebar/src/sidebar-item.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { buildProps } from '@puik/utils'
import type { ExtractPropTypes } from 'vue'
import type { RouteLocationRaw } from 'vue-router'
import type { ExtractPropTypes, PropType } from 'vue'
import type SidebarItem from './sidebar-item.vue'

export const sidebarItemProps = buildProps({
Expand All @@ -13,7 +14,7 @@ export const sidebarItemProps = buildProps({
default: undefined,
},
to: {
type: String,
type: [Object, String] as PropType<RouteLocationRaw>,
required: false,
default: undefined,
},
Expand Down

0 comments on commit 7bf80c5

Please sign in to comment.