From d3c337fae25458b96f9f6087e2c10ffece5dd856 Mon Sep 17 00:00:00 2001 From: mehbark Date: Sat, 15 Jul 2023 22:53:32 -0400 Subject: [PATCH] hlm looking pretty sweet --- html/common.tsx | 5 +++++ html/hotline-miami.tsx | 11 ++++++++--- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/html/common.tsx b/html/common.tsx index cd1f5ac..ae9383e 100644 --- a/html/common.tsx +++ b/html/common.tsx @@ -50,3 +50,8 @@ export const render_and_copy = (elem: VNode) => { writeText(rendered); console.log(rendered); }; + +export const mk_class_wrapper = + (klass: string) => + ({ children }: { children: ComponentChildren }) => +
{...toChildArray(children)}
; diff --git a/html/hotline-miami.tsx b/html/hotline-miami.tsx index ff21920..43ff712 100644 --- a/html/hotline-miami.tsx +++ b/html/hotline-miami.tsx @@ -1,7 +1,7 @@ import { EggbugImg, Main, render_and_copy } from "./common.tsx"; import { ComponentChildren, JSX, toChildArray } from "preact"; -const Pulse = ({ children }: { children: ComponentChildren }): JSX.Element => ( +const Pulse = ({ children }: { children: ComponentChildren }) => (
{...toChildArray(children)}
{...toChildArray(children)}
@@ -12,9 +12,14 @@ const Portrait = ({ href, alt }: { href: string; alt: string }) => ( {alt} ); +const Wiggle = ({ children }: { children: ComponentChildren }) => ( +
{...toChildArray(children)}
+); + const PortraitFrame = ({ children }: { children: ComponentChildren }) => (
-
{children}
+
+ {children}
); @@ -29,7 +34,7 @@ const PortraitFrame = ({ children }: { children: ComponentChildren }) => ( // i'll probably go for a different ui element render_and_copy(
-
press [rmb] to AWESOMESAUCE
+
press [rmb] to open browser context menu