mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-27 10:20:42 +01:00
chore(Link): remove useless props object
This commit is contained in:
@@ -1,7 +1,5 @@
|
|||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import type { PropType } from 'vue'
|
|
||||||
import type { NuxtLinkProps } from '#app'
|
import type { NuxtLinkProps } from '#app'
|
||||||
import type { RouteLocationRaw } from '#vue-router'
|
|
||||||
|
|
||||||
export interface LinkProps extends NuxtLinkProps {
|
export interface LinkProps extends NuxtLinkProps {
|
||||||
as?: string
|
as?: string
|
||||||
@@ -13,119 +11,6 @@ export interface LinkProps extends NuxtLinkProps {
|
|||||||
exactHash?: boolean
|
exactHash?: boolean
|
||||||
inactiveClass?: string
|
inactiveClass?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export const linkProps = {
|
|
||||||
// Routing
|
|
||||||
to: {
|
|
||||||
type: [String, Object] as PropType<RouteLocationRaw>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
href: {
|
|
||||||
type: [String, Object] as PropType<RouteLocationRaw>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
|
|
||||||
// Attributes
|
|
||||||
target: {
|
|
||||||
type: String as PropType<NuxtLinkProps['target']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
rel: {
|
|
||||||
type: String as PropType<NuxtLinkProps['rel']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
noRel: {
|
|
||||||
type: Boolean as PropType<NuxtLinkProps['noRel']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
|
|
||||||
// Prefetching
|
|
||||||
prefetch: {
|
|
||||||
type: Boolean as PropType<NuxtLinkProps['prefetch']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
noPrefetch: {
|
|
||||||
type: Boolean as PropType<NuxtLinkProps['noPrefetch']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
|
|
||||||
// Styling
|
|
||||||
activeClass: {
|
|
||||||
type: String as PropType<NuxtLinkProps['activeClass']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
exactActiveClass: {
|
|
||||||
type: String as PropType<NuxtLinkProps['exactActiveClass']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
prefetchedClass: {
|
|
||||||
type: String as PropType<NuxtLinkProps['prefetchedClass']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
|
|
||||||
// Vue Router's `<RouterLink>` additional props
|
|
||||||
replace: {
|
|
||||||
type: Boolean as PropType<NuxtLinkProps['replace']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
ariaCurrentValue: {
|
|
||||||
type: String as PropType<NuxtLinkProps['ariaCurrentValue']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
|
|
||||||
// Edge cases handling
|
|
||||||
external: {
|
|
||||||
type: Boolean as PropType<NuxtLinkProps['external']>,
|
|
||||||
default: undefined,
|
|
||||||
required: false
|
|
||||||
},
|
|
||||||
|
|
||||||
// Specific props
|
|
||||||
as: {
|
|
||||||
type: String as PropType<LinkProps['as']>,
|
|
||||||
default: 'button'
|
|
||||||
},
|
|
||||||
type: {
|
|
||||||
type: String as PropType<LinkProps['type']>,
|
|
||||||
default: 'button'
|
|
||||||
},
|
|
||||||
disabled: {
|
|
||||||
type: Boolean as PropType<LinkProps['disabled']>,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
active: {
|
|
||||||
type: Boolean as PropType<LinkProps['active']>,
|
|
||||||
default: undefined
|
|
||||||
},
|
|
||||||
exact: {
|
|
||||||
type: Boolean as PropType<LinkProps['exact']>,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
exactQuery: {
|
|
||||||
type: Boolean as PropType<LinkProps['exactQuery']>,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
exactHash: {
|
|
||||||
type: Boolean as PropType<LinkProps['exactHash']>,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
inactiveClass: {
|
|
||||||
type: String as PropType<LinkProps['inactiveClass']>,
|
|
||||||
default: undefined
|
|
||||||
}
|
|
||||||
} as const
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
|
|||||||
Reference in New Issue
Block a user