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 { 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",