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";
|
||||
|
||||
export const Main: Component = (attributes, children) => (
|
||||
|
@ -20,3 +21,15 @@ export const styles = (s: Record<string, string | number>): string =>
|
|||
Object.entries(s)
|
||||
.map(([rule, val]) => `${rule}: ${val};`)
|
||||
.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 = () => (
|
||||
<HCenter>
|
||||
<img
|
||||
class="eggbug"
|
||||
src="https://staging.cohostcdn.org/attachment/f33b4285-0455-4128-96b8-117054af40c3/eggbugSquare.png"
|
||||
alt="eggbug, smiling"
|
||||
/>
|
||||
<Eggbug type="smiling" />
|
||||
</HCenter>
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in a new issue