From cdfa4a4d6985018b74f9728f8dbd1633456c449a Mon Sep 17 00:00:00 2001 From: mehbark Date: Thu, 20 Jul 2023 22:27:24 -0400 Subject: [PATCH] getting rid of toggle --- html/chessboard.tsx | 2 +- html/pixels.tsx | 63 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 1 deletion(-) create mode 100644 html/pixels.tsx diff --git a/html/chessboard.tsx b/html/chessboard.tsx index 3418785..c1ffc08 100644 --- a/html/chessboard.tsx +++ b/html/chessboard.tsx @@ -95,6 +95,7 @@ const Pieces = () => { render_and_copy(
+ @@ -103,7 +104,6 @@ render_and_copy( -
, true ); diff --git a/html/pixels.tsx b/html/pixels.tsx new file mode 100644 index 0000000..b4de922 --- /dev/null +++ b/html/pixels.tsx @@ -0,0 +1,63 @@ +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 }) => ( +
+ +
+ {a} +
+
+
+ {b} +
+
+); + +const Pixel = ({ color_a, color_b }: { color_a: string; color_b: string }) => ( + + } + b={ +
+ } + /> +); + +render_and_copy( +
+ + + + + + + + + + + + + + + + +
+);