diff --git a/html/pixels.tsx b/html/pixels.tsx index b4de922..f7d4b16 100644 --- a/html/pixels.tsx +++ b/html/pixels.tsx @@ -1,63 +1,43 @@ import { ComponentChildren, JSX } from "preact"; import { Main, render_and_copy } from "./common.tsx"; -// kind of made this not generic :( -const Toggle = ({ a, b }: { a: JSX.Element; b: JSX.Element }) => ( +// don't want to do randomly on since it's not unique anyway +const Pixel = ({ color_a, color_b }: { color_a: string; color_b: string }) => (
- -
- {a} -
-
-
- {b} -
+ +
); -const Pixel = ({ color_a, color_b }: { color_a: string; color_b: string }) => ( - - } - b={ -
- } - /> +const Pixels = ({ + n, + color_a, + color_b, +}: { + n: number; + color_a: string; + color_b: string; +}) => ( + <> + {...new Array(n) + .fill(null) + .map(() => )} + ); render_and_copy(
- - - - - - - - - - - - - - - - +
);