only peopleify the subjects

This commit is contained in:
mehbark 2023-07-10 14:57:18 -04:00
parent 787a07a9a2
commit b643f04388

View file

@ -1,9 +1,12 @@
import { Html, debug_render } from "./html.ts";
import { Component } from "./jsx/jsx-runtime.ts";
const peopleify = (...people: string[]): string[] =>
people.map(p => `${p} people`);
const wheel = (...items: Html[]): Html => (
<div class="wheel">
{...items.map(i => <div class="wheel-item">{i} people</div>)}
{...items.map(i => <div class="wheel-item">{i}</div>)}
</div>
);
@ -17,7 +20,7 @@ const Take: Component = ({ subjects, objects, adjectives }, _) => (
// might want to have the final item be seperate
debug_render(
<Take
subjects={[
subjects={peopleify(
"poor",
"fat",
"dumb",
@ -27,8 +30,8 @@ debug_render(
"fat",
"dumb",
"tall",
"hot",
]}
"hot"
)}
objects={[
"apples",
"bread",