diff --git a/ignite-router.js b/ignite-router.js index 08c7965..5f262da 100644 --- a/ignite-router.js +++ b/ignite-router.js @@ -19,6 +19,17 @@ class RouterLink extends IgniteElement { }; } + get styles() { + return ` + router-link { + display: flex; + flex-direction: row; + align-items: center; + justify-content: center; + } + `; + } + render() { return this.template .onClick((event) => this.onClick(event)) @@ -185,16 +196,16 @@ class RouteMatcher { window.RouteMatcher = RouteMatcher; class RouterLinkTemplate extends IgniteTemplate { - constructor(route, element) { - super("router-link", [element]); + constructor(route, ...elements) { + super("router-link", elements); this.property("route", route); } } class RouterViewTemplate extends IgniteTemplate { - constructor(route, element) { - super("router-view", [element]); + constructor(route, ...elements) { + super("router-view", elements); this.property("route", route); }