Will it work?
This commit is contained in:
parent
79f7c4c16f
commit
f74c86f4b1
19 changed files with 193 additions and 78 deletions
|
|
@ -5,6 +5,7 @@ export const generate = (
|
|||
count: number,
|
||||
color?: () => string,
|
||||
height?: () => number,
|
||||
isAnimated?: (index) => boolean,
|
||||
transform?: () => string
|
||||
): html => `
|
||||
<section class="background">
|
||||
|
|
@ -13,8 +14,12 @@ export const generate = (
|
|||
? new Array(count)
|
||||
.fill(0, 0, count)
|
||||
.map(
|
||||
_ =>
|
||||
`<div style="background-color: ${color()}; height: ${height()}px; transform: ${transform()}"></div>`
|
||||
(_, i) => `
|
||||
<div class="${
|
||||
isAnimated(i) ? "animated" : ""
|
||||
}" style="background-color: ${color()}; height: ${height()}px; transform: ${transform()}"
|
||||
></div>
|
||||
`
|
||||
)
|
||||
.join("")
|
||||
: ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue