gonna switch to preact jsx
This commit is contained in:
parent
41b3127e17
commit
2bb8e71a46
2 changed files with 14 additions and 5 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
import { Html } from "./html.ts";
|
||||||
import { Component } from "./jsx/jsx-runtime.ts";
|
import { Component } from "./jsx/jsx-runtime.ts";
|
||||||
|
|
||||||
export const Main: Component = (attributes, children) => (
|
export const Main: Component = (attributes, children) => (
|
||||||
|
@ -20,3 +21,15 @@ export const styles = (s: Record<string, string | number>): string =>
|
||||||
Object.entries(s)
|
Object.entries(s)
|
||||||
.map(([rule, val]) => `${rule}: ${val};`)
|
.map(([rule, val]) => `${rule}: ${val};`)
|
||||||
.join("");
|
.join("");
|
||||||
|
|
||||||
|
export const eggbug_emotions: Record<string, Html> = {
|
||||||
|
smiling: (
|
||||||
|
<img
|
||||||
|
class="eggbug"
|
||||||
|
src="https://staging.cohostcdn.org/attachment/f33b4285-0455-4128-96b8-117054af40c3/eggbugSquare.png"
|
||||||
|
alt="eggbug, smiling"
|
||||||
|
/>
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
||||||
|
export const EggbugImg: Component = ({ type }) => eggbug_emotions[type];
|
||||||
|
|
|
@ -4,11 +4,7 @@ import { Component } from "./jsx/jsx-runtime.ts";
|
||||||
|
|
||||||
const Eggbug: Component = () => (
|
const Eggbug: Component = () => (
|
||||||
<HCenter>
|
<HCenter>
|
||||||
<img
|
<Eggbug type="smiling" />
|
||||||
class="eggbug"
|
|
||||||
src="https://staging.cohostcdn.org/attachment/f33b4285-0455-4128-96b8-117054af40c3/eggbugSquare.png"
|
|
||||||
alt="eggbug, smiling"
|
|
||||||
/>
|
|
||||||
</HCenter>
|
</HCenter>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue