File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -37,12 +37,26 @@ export class MenuItem extends LitElement {
37
37
color: var(--vscode-menu-selectionForeground);
38
38
background-color: var(--vscode-menu-background);
39
39
}
40
+
41
+ :host([href]) {
42
+ padding-inline: 0;
43
+ }
44
+
45
+ a {
46
+ display: block;
47
+ color: inherit;
48
+ text-decoration: none;
49
+ padding: 0 0.6rem;
50
+ }
40
51
` ,
41
52
] ;
42
53
43
54
@property ( { type : Boolean , reflect : true } )
44
55
disabled = false ;
45
56
57
+ @property ( { reflect : true } )
58
+ href ?: string ;
59
+
46
60
@property ( { reflect : true } )
47
61
override role = 'option' ;
48
62
@@ -57,6 +71,9 @@ export class MenuItem extends LitElement {
57
71
}
58
72
59
73
override render ( ) {
74
+ if ( this . href ) {
75
+ return html `< a href =${ this . href } > < slot > </ slot > </ a > ` ;
76
+ }
60
77
return html `< slot > </ slot > ` ;
61
78
}
62
79
}
You can’t perform that action at this time.
0 commit comments