Skip to content

Commit

Permalink
Merge pull request #166 from PrestaShopCorp/fix/button
Browse files Browse the repository at this point in the history
fix: (issue #165) add type RouteLocationRaw for prop "to"
  • Loading branch information
mattgoud authored Aug 30, 2023
2 parents 6db9d35 + 7bf80c5 commit 34362ea
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 34362ea

Please sign in to comment.