Skip to content

Commit

Permalink
refactored repeat
Browse files Browse the repository at this point in the history
  • Loading branch information
eljefe223 committed May 16, 2020
1 parent 84c1cec commit 18be153
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { html, repeat } from "@microsoft/fast-element";
import { FastFrame } from "./fast-frame";
import { StandardLuminance } from "@microsoft/fast-components-styles-msft";
import { accentPalette } from "@microsoft/fast-components/dist/fast-design-system";
import { FASTRadio } from "@microsoft/fast-components";

export const FastFrameTemplate = html<FastFrame>`
<template>
Expand Down Expand Up @@ -95,7 +96,8 @@ export const FastFrameTemplate = html<FastFrame>`
<site-color-swatch
value="${x => x}"
background-color="${x => x}"
checked="${x => x === "#1F1F1F"}"
checked="${(x, c) =>
x === c.parent.previewBackgroundPalette[0]}"
></site-color-swatch>
`
)}
Expand All @@ -108,12 +110,13 @@ export const FastFrameTemplate = html<FastFrame>`
>
<label slot="label">Accent color</label>
${repeat(
x => x.previewAccentPalette,
(x, c) => x.previewAccentPalette,
html<string>`
<site-color-swatch
value="${x => x}"
background-color="${x => x}"
checked="${x => x === "#F33378"}"
checked="${(x, c) =>
x === c.parent.previewAccentPalette[0]}"
></site-color-swatch>
`
)}
Expand Down

0 comments on commit 18be153

Please sign in to comment.