File tree Expand file tree Collapse file tree 1 file changed +18
-10
lines changed
src/webviews/apps/shared/components/chips Expand file tree Collapse file tree 1 file changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ export class ActionChip extends LitElement {
5151 gap: 0.2rem;
5252 vertical-align: middle;
5353 color: inherit;
54+ text-decoration: none;
5455 }
5556 a:focus {
5657 outline: none;
@@ -79,17 +80,24 @@ export class ActionChip extends LitElement {
7980 private defaultFocusEl ! : HTMLAnchorElement ;
8081
8182 override render ( ) : unknown {
83+ if ( ! this . label ) {
84+ return this . renderContent ( ) ;
85+ }
86+
87+ return html `< gl-tooltip hoist content ="${ this . label } "> ${ this . renderContent ( ) } </ gl-tooltip > ` ;
88+ }
89+
90+ private renderContent ( ) {
8291 return html `
83- < gl-tooltip hoist content ="${ this . label ?? nothing } ">
84- < a
85- role ="${ ! this . href ? 'button' : nothing } "
86- type ="${ ! this . href ? 'button' : nothing } "
87- ?disabled =${ this . disabled }
88- href =${ this . href ?? nothing }
89- >
90- < code-icon icon ="${ this . icon } "> </ code-icon > < slot > </ slot >
91- </ a >
92- </ gl-tooltip >
92+ < a
93+ part ="base "
94+ role ="${ ! this . href ? 'button' : nothing } "
95+ type ="${ ! this . href ? 'button' : nothing } "
96+ ?disabled =${ this . disabled }
97+ href =${ this . href ?? nothing }
98+ >
99+ < code-icon part ="icon " icon ="${ this . icon } "> </ code-icon > < slot > </ slot >
100+ </ a >
93101 ` ;
94102 }
95103
You can’t perform that action at this time.
0 commit comments