hlm looking pretty sweet
This commit is contained in:
parent
ca9fd28ebc
commit
d3c337fae2
2 changed files with 13 additions and 3 deletions
|
@ -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 }) =>
|
||||
<div class="klass">{...toChildArray(children)}</div>;
|
||||
|
|
|
@ -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 }) => (
|
||||
<div class="pulse">
|
||||
<div class="pulse-bottom">{...toChildArray(children)}</div>
|
||||
<div class="pulse-top">{...toChildArray(children)}</div>
|
||||
|
@ -12,9 +12,14 @@ const Portrait = ({ href, alt }: { href: string; alt: string }) => (
|
|||
<img class="portrait" href={href} alt={alt} />
|
||||
);
|
||||
|
||||
const Wiggle = ({ children }: { children: ComponentChildren }) => (
|
||||
<div class="wiggle">{...toChildArray(children)}</div>
|
||||
);
|
||||
|
||||
const PortraitFrame = ({ children }: { children: ComponentChildren }) => (
|
||||
<div class="portrait-frame">
|
||||
<div class="portrait-frame-inner">{children}</div>
|
||||
<div class="portrait-frame-inner"></div>
|
||||
<Wiggle>{children}</Wiggle>
|
||||
</div>
|
||||
);
|
||||
|
||||
|
@ -29,7 +34,7 @@ const PortraitFrame = ({ children }: { children: ComponentChildren }) => (
|
|||
// i'll probably go for a different ui element
|
||||
render_and_copy(
|
||||
<Main>
|
||||
<div class="top">press [rmb] to AWESOMESAUCE</div>
|
||||
<div class="top">press [rmb] to open browser context menu</div>
|
||||
<div class="middle">
|
||||
<div class="game"></div>
|
||||
<PortraitFrame>
|
||||
|
|
Loading…
Reference in a new issue