File tree Expand file tree Collapse file tree 2 files changed +35
-21
lines changed
src/runtime/components/elements Expand file tree Collapse file tree 2 files changed +35
-21
lines changed Original file line number Diff line number Diff line change @@ -16,25 +16,24 @@ import buildAppConfig from "#build/app.config";
16
16
17
17
type ParentLinkProps = InstanceType < typeof UiLink > [ "$props" ] ;
18
18
type ButtonUiConfig = Partial < UiButtonConfig > ;
19
+ type Props = ParentLinkProps & {
20
+ label ?: string ;
21
+ leadingIcon ?: string ;
22
+ trailingIcon ?: string ;
23
+ type ?: HTMLButtonElement [ "type" ] ;
24
+ loading ?: boolean ;
25
+ disabled ?: boolean ;
26
+ truncate ?: boolean ;
27
+ block ?: boolean ;
28
+ padded ?: boolean ;
29
+ size ?: UiButtonSizes ;
30
+ color ?: UiButtonColors ;
31
+ variant ?: UiButtonVariants ;
32
+ loadingIcon ?: string ;
33
+ ui ?: ButtonUiConfig ;
34
+ } ;
19
35
20
- export default defineComponent <
21
- ParentLinkProps & {
22
- label ?: string ;
23
- leadingIcon ?: string ;
24
- trailingIcon ?: string ;
25
- type ?: HTMLButtonElement [ "type" ] ;
26
- loading ?: boolean ;
27
- disabled ?: boolean ;
28
- truncate ?: boolean ;
29
- block ?: boolean ;
30
- padded ?: boolean ;
31
- size ?: UiButtonSizes ;
32
- color ?: UiButtonColors ;
33
- variant ?: UiButtonVariants ;
34
- loadingIcon ?: string ;
35
- ui ?: ButtonUiConfig ;
36
- }
37
- > ( {
36
+ export default defineComponent < Props > ( {
38
37
components : { UiLink, UiIcon } ,
39
38
40
39
props : {
Original file line number Diff line number Diff line change 1
1
import { NuxtLink } from "#components" ;
2
2
import { useRoute } from "#imports" ;
3
3
import { defineComponent , h , type PropType } from "vue" ;
4
- import type { RouteLocationNormalized } from "vue-router" ;
4
+ import type { RouteLocationNormalized , RouteLocationRaw } from "vue-router" ;
5
5
import { classNames , isDeepEqual } from "../../utils" ;
6
6
7
- type NuxtLinkProps = InstanceType < typeof NuxtLink > [ "$props" ] ;
8
- type Props = NuxtLinkProps & {
7
+ type Props = {
8
+ // NuxtLink props
9
+ to ?: RouteLocationRaw ;
10
+ href ?: RouteLocationRaw ;
11
+ external ?: boolean ;
12
+ replace ?: boolean ;
13
+ custom ?: boolean ;
14
+ target ?: "_blank" | "_parent" | "_self" | "_top" | ( string & { } ) | null ;
15
+ rel ?: string | null ;
16
+ noRel ?: boolean ;
17
+ prefetch ?: boolean ;
18
+ noPrefetch ?: boolean ;
19
+ activeClass ?: string ;
20
+ exactActiveClass ?: string ;
21
+ ariaCurrentValue ?: string ;
22
+
23
+ // UiLink props
9
24
type ?: HTMLButtonElement [ "type" ] ;
10
25
disabled ?: boolean ;
11
26
exact ?: boolean ;
You can’t perform that action at this time.
0 commit comments