From 67d1c9aab948d457f49f3f609f5cf8a1c6ec90ff Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Oct 2023 21:57:28 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/renderer/src/stories/Main.js | 7 +++---- .../src/stories/pages/guided-mode/GuidedCapsules.js | 10 +++++++--- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/stories/Main.js b/src/renderer/src/stories/Main.js index 28e6b9c6e..7ad3d4968 100644 --- a/src/renderer/src/stories/Main.js +++ b/src/renderer/src/stories/Main.js @@ -104,16 +104,15 @@ export class Main extends LitElement { if (section) { if (capsules === true || !("capsules" in page)) { let pages = Object.values(section.pages); - const pageIds = Object.keys(section.pages) + const pageIds = Object.keys(section.pages); if (pages.length > 1) { const capsulesProps = { n: pages.length, selected: pages.map((o) => o.pageLabel).indexOf(page.info.label), }; - - capsules = new GuidedCapsules(capsulesProps) - capsules.onClick = (i) => this.toRender.page.to(pageIds[i]) + capsules = new GuidedCapsules(capsulesProps); + capsules.onClick = (i) => this.toRender.page.to(pageIds[i]); } } diff --git a/src/renderer/src/stories/pages/guided-mode/GuidedCapsules.js b/src/renderer/src/stories/pages/guided-mode/GuidedCapsules.js index ad9da9225..c28be5f82 100644 --- a/src/renderer/src/stories/pages/guided-mode/GuidedCapsules.js +++ b/src/renderer/src/stories/pages/guided-mode/GuidedCapsules.js @@ -26,17 +26,21 @@ export class GuidedCapsules extends LitElement { return this; } - onClick = () => {} + onClick = () => {}; render() { if (!this.n) return html``; return html` -
+
${Array.from( { length: this.n }, - (_, i) => html`
this.onClick(i)} class="guided--capsule ${i === this.selected ? `active` : ""}">
` + (_, i) => + html`
this.onClick(i)} + class="guided--capsule ${i === this.selected ? `active` : ""}" + >
` )}