import * as nat from "https://deno.land/x/nat@0.0.2/styles.ts";
An abstraction over twind which allows creating re-usable styles that can then be inlined into HTML or JSX classes.
Example
import { createStyle, h } from "https://deno.land/x/nat/mod.ts";
const style = createStyle({
title: "font-xl bold",
link: "underline",
});
function App() {
return (
<div>
<h1 class={style("title")}>Title<h1>
<a href="./a" class={style("link")}>a</a>
</div>
);
}
Functions
A factory function that will return a StyleFunction that will make it easy to re-use groupings of twind/tailwind classes. |