Skip to content

Commit

Permalink
feat: allow component level routerComponentName prop to be an object
Browse files Browse the repository at this point in the history
This is needed to allow for component instances of link components link `NuxtLink` to be used.
  • Loading branch information
patrickcate committed Feb 22, 2024
1 parent 9e6a103 commit 5ddadab
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/components/BaseLink/BaseLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
default: '',
},
routerComponentName: {
type: String,
type: [String, Object],
default: '',
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaBreadcrumbItem/UsaBreadcrumbItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const props = defineProps({
default: '',
},
routerComponentName: {
type: String,
type: [String, Object],
default: '',
},
current: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const props = defineProps({
default: '',
},
routerComponentName: {
type: String,
type: [String, Object],
default: '',
},
headingTag: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaCollectionItem/UsaCollectionItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const props = defineProps({
default: '',
},
routerComponentName: {
type: String,
type: [String, Object],
default: '',
},
customClasses: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaIdentifierLogo/UsaIdentifierLogo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const props = defineProps({
default: '',
},
routerComponentName: {
type: String,
type: [String, Object],
default: '',
},
src: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaLogo/UsaLogo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const props = defineProps({
default: '/',
},
routerComponentName: {
type: String,
type: [String, Object],
default: '',
},
customClasses: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaNavPrimaryItem/UsaNavPrimaryItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const props = defineProps({
default: '',
},
routerComponentName: {
type: String,
type: [String, Object],
default: '',
},
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaNavSubmenuItem/UsaNavSubmenuItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const props = defineProps({
default: '',
},
routerComponentName: {
type: String,
type: [String, Object],
default: '',
},
})
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaPaginationArrow/UsaPaginationArrow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const props = defineProps({
default: undefined,
},
routerComponentName: {
type: String,
type: [String, Object],
default: undefined,
},
customClasses: {
Expand Down
2 changes: 1 addition & 1 deletion src/components/UsaPaginationItem/UsaPaginationItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const props = defineProps({
default: undefined,
},
routerComponentName: {
type: String,
type: [String, Object],
default: undefined,
},
})
Expand Down
4 changes: 3 additions & 1 deletion src/components/UsaTooltip/UsaTooltip.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ watch(isSet, currentlySet => {
isVisible.value = currentlySet
// May be able to be removed once:
// https://github.com/uswds/uswds/issues/4458 is fixed.
// @deprecated if issue is fixed.
currentCoordinates.value.opacity = currentlySet ? 1 : 0
})
})
Expand All @@ -113,7 +114,8 @@ onMounted(() => {
// `isSet` needs to be `true` until floating UI has initialized and has
// calculated it's initial position.
// May be able to be removed once:
// https://github.com/uswds/uswds/issues/4458 is fixed.
// https://github.com/uswds/uswds/issues/4458 is fixed.
// @deprecated if issue is fixed.
isSet.value = true
cleanupFloatingUi = autoUpdate(
Expand Down

0 comments on commit 5ddadab

Please sign in to comment.