only peopleify the subjects
This commit is contained in:
parent
787a07a9a2
commit
b643f04388
1 changed files with 7 additions and 4 deletions
|
@ -1,9 +1,12 @@
|
||||||
import { Html, debug_render } from "./html.ts";
|
import { Html, debug_render } from "./html.ts";
|
||||||
import { Component } from "./jsx/jsx-runtime.ts";
|
import { Component } from "./jsx/jsx-runtime.ts";
|
||||||
|
|
||||||
|
const peopleify = (...people: string[]): string[] =>
|
||||||
|
people.map(p => `${p} people`);
|
||||||
|
|
||||||
const wheel = (...items: Html[]): Html => (
|
const wheel = (...items: Html[]): Html => (
|
||||||
<div class="wheel">
|
<div class="wheel">
|
||||||
{...items.map(i => <div class="wheel-item">{i} people</div>)}
|
{...items.map(i => <div class="wheel-item">{i}</div>)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -17,7 +20,7 @@ const Take: Component = ({ subjects, objects, adjectives }, _) => (
|
||||||
// might want to have the final item be seperate
|
// might want to have the final item be seperate
|
||||||
debug_render(
|
debug_render(
|
||||||
<Take
|
<Take
|
||||||
subjects={[
|
subjects={peopleify(
|
||||||
"poor",
|
"poor",
|
||||||
"fat",
|
"fat",
|
||||||
"dumb",
|
"dumb",
|
||||||
|
@ -27,8 +30,8 @@ debug_render(
|
||||||
"fat",
|
"fat",
|
||||||
"dumb",
|
"dumb",
|
||||||
"tall",
|
"tall",
|
||||||
"hot",
|
"hot"
|
||||||
]}
|
)}
|
||||||
objects={[
|
objects={[
|
||||||
"apples",
|
"apples",
|
||||||
"bread",
|
"bread",
|
||||||
|
|
Loading…
Reference in a new issue