gale/styler.tsx
2024-10-09 08:01:50 -04:00

40 lines
734 B
TypeScript

import Gale from "./gale-custom.tsx";
import Render from "preact-render-to-string";
const jsx = <div className={Gale.Q.lg( Gale.Face.sans, Gale.Q.md(Gale.Pad.large), Gale.Pad.small)}>
hello!
</div>
Deno.writeTextFile(
"dump.html",
`<!DOCTYPE html>
<head>
<meta name="viewport" content="width=device-width, initial-size=1" />
<style>${Gale.Sheet()}</style>
</head>
<body>
${Render(jsx)}
</body>
</html>`
)
// idea for table:
// Gale.Table(
// [, "md" ], {
// Face:["serif", "sans" ],
// Pad:["small", "large"]
// })
// idea for object
//Gale({
// lg:{
// Face:"sans",
// Pad:"small"
// },
// md:{
// Pad:"large"
// }
//})
// idea for function
//Gale.Gen(g=>[g.md(), g.Face.Sans])