-
Notifications
You must be signed in to change notification settings - Fork 462
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(Button): inherit nuxt link props without breaking `nuxt-component…
…-meta` Resolves #578
- Loading branch information
1 parent
cefa597
commit d3e19dc
Showing
3 changed files
with
66 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import type { PropType } from 'vue' | ||
import type { RouteLocationRaw } from '#vue-router' | ||
|
||
export const nuxtLinkProps = { | ||
to: { | ||
type: [String, Object] as PropType<RouteLocationRaw>, | ||
default: undefined | ||
}, | ||
href: { | ||
type: [String, Object] as PropType<RouteLocationRaw>, | ||
default: undefined | ||
}, | ||
// Attributes | ||
target: { | ||
type: String as PropType<'_blank' | '_parent' | '_self' | '_top' | (string & {}) | null>, | ||
default: undefined | ||
}, | ||
rel: { | ||
type: String, | ||
default: undefined | ||
}, | ||
noRel: { | ||
type: Boolean, | ||
default: undefined | ||
}, | ||
// Prefetching | ||
prefetch: { | ||
type: Boolean, | ||
default: undefined | ||
}, | ||
noPrefetch: { | ||
type: Boolean, | ||
default: undefined | ||
}, | ||
// Styling | ||
activeClass: { | ||
type: String, | ||
default: undefined | ||
}, | ||
exactActiveClass: { | ||
type: String, | ||
default: undefined | ||
}, | ||
prefetchedClass: { | ||
type: String, | ||
default: undefined | ||
}, | ||
// Vue Router's `<RouterLink>` additional props | ||
replace: { | ||
type: Boolean, | ||
default: undefined | ||
}, | ||
ariaCurrentValue: { | ||
type: String, | ||
default: undefined | ||
}, | ||
// Edge cases handling | ||
external: { | ||
type: Boolean, | ||
default: undefined | ||
} | ||
} as const |
d3e19dc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
ui – ./
ui-git-dev-nuxt-js.vercel.app
ui.nuxt.com
ui-nuxt-js.vercel.app