From 883dd48171d2a2707949fea4ec2c0e93bd3b1548 Mon Sep 17 00:00:00 2001 From: Nikolai Dorofeev Date: Mon, 24 Jun 2024 08:36:11 +0400 Subject: [PATCH] [esprit design] Add named routes typing support --- .changeset/ten-eyes-jump.md | 5 +++++ .../esprit-design/src/components/buttons/DBigBangButton.vue | 3 ++- packages/esprit-design/src/components/buttons/DBtn.vue | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .changeset/ten-eyes-jump.md diff --git a/.changeset/ten-eyes-jump.md b/.changeset/ten-eyes-jump.md new file mode 100644 index 00000000..40cba66c --- /dev/null +++ b/.changeset/ten-eyes-jump.md @@ -0,0 +1,5 @@ +--- +'@d0rich/esprit-design': patch +--- + +Add named routes typing diff --git a/packages/esprit-design/src/components/buttons/DBigBangButton.vue b/packages/esprit-design/src/components/buttons/DBigBangButton.vue index 33dc71eb..1858513d 100644 --- a/packages/esprit-design/src/components/buttons/DBigBangButton.vue +++ b/packages/esprit-design/src/components/buttons/DBigBangButton.vue @@ -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' @@ -20,7 +21,7 @@ const props = defineProps({ default: 'button' }, to: { - type: String, + type: [String, Object as () => RouteLocationRaw], default: '' } }) diff --git a/packages/esprit-design/src/components/buttons/DBtn.vue b/packages/esprit-design/src/components/buttons/DBtn.vue index efaeedeb..c8a76190 100644 --- a/packages/esprit-design/src/components/buttons/DBtn.vue +++ b/packages/esprit-design/src/components/buttons/DBtn.vue @@ -1,4 +1,5 @@