mirror of
https://github.com/FJurmanovic/wallet-web.git
synced 2026-02-06 06:08:10 +00:00
use a element instead of span for links
This commit is contained in:
@@ -36,7 +36,8 @@ class AppLinkElement extends HTMLElement {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
goTo = () => {
|
goTo = (e: Event) => {
|
||||||
|
e.preventDefault();
|
||||||
if (!isTrue(this.goBack) && this.to) {
|
if (!isTrue(this.goBack) && this.to) {
|
||||||
this.routerService.goTo(this.to);
|
this.routerService.goTo(this.to);
|
||||||
} else {
|
} else {
|
||||||
@@ -51,18 +52,19 @@ class AppLinkElement extends HTMLElement {
|
|||||||
|
|
||||||
render = () => {
|
render = () => {
|
||||||
return html`${this.disabled
|
return html`${this.disabled
|
||||||
? html`<span
|
? html`<a
|
||||||
class="btn btn-link btn-disabled"
|
class="btn btn-link btn-disabled"
|
||||||
data-target="app-link.main"
|
data-target="app-link.main"
|
||||||
style="color:grey"
|
style="color:grey"
|
||||||
>${this.title}</span
|
>${this.title}</a
|
||||||
>`
|
>`
|
||||||
: html`<span
|
: html`<a
|
||||||
class="btn btn-link btn-disabled"
|
class="btn btn-link btn-disabled"
|
||||||
data-target="app-link.main"
|
data-target="app-link.main"
|
||||||
data-action="click:app-link#goTo"
|
data-action="click:app-link#goTo"
|
||||||
|
href="${this.to}"
|
||||||
style="text-decoration: underline; cursor: pointer;"
|
style="text-decoration: underline; cursor: pointer;"
|
||||||
>${this.title}</span
|
>${this.title}</a
|
||||||
>`}`;
|
>`}`;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user