Skip to content

Commit

Permalink
[esprit design] Add named routes typing support
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikolai Dorofeev committed Jun 24, 2024
1 parent 3ba3385 commit 883dd48
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/ten-eyes-jump.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@d0rich/esprit-design': patch
---

Add named routes typing
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import { computed } from 'vue'
import { useDBigBangButtonUtils } from '../../composables/big-bang-button-utils'
import { useLink } from '../../composables/router'
import type { RouteLocationRaw } from 'vue-router'
export default {
name: 'DBigBangButton'
Expand All @@ -20,7 +21,7 @@ const props = defineProps({
default: 'button'
},
to: {
type: String,
type: [String, Object as () => RouteLocationRaw],
default: ''
}
})
Expand Down
3 changes: 2 additions & 1 deletion packages/esprit-design/src/components/buttons/DBtn.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script lang="ts">
import type { RouteLocationRaw } from 'vue-router'
import type { HighlightVariant } from '../utils/index'
import DWrapFocusHighlight from '../utils/DWrapFocusHighlight.vue'
import { useLink } from '../../composables/router'
Expand All @@ -14,7 +15,7 @@ export default {
<script setup lang="ts">
const props = defineProps({
to: {
type: String,
type: [String, Object as () => RouteLocationRaw],
default: ''
},
href: {
Expand Down

0 comments on commit 883dd48

Please sign in to comment.