feat: twind plugin (#513)

This adds a first-party twind plugin to use twind for styling.
This commit is contained in:
Luca Casonato
2022-08-09 21:41:11 +02:00
committed by GitHub
parent fd4e2bbe17
commit 660e0f5fef
20 changed files with 296 additions and 238 deletions
+1 -2
View File
@@ -1,6 +1,5 @@
/** @jsx h */
import { h } from "preact";
import { tw } from "@twind";
export function RoundedButton(props: h.JSX.HTMLAttributes<HTMLButtonElement>) {
return (
@@ -9,7 +8,7 @@ export function RoundedButton(props: h.JSX.HTMLAttributes<HTMLButtonElement>) {
touchAction: "manipulation",
}}
{...props}
class={tw`p-3 border border-transparent rounded-full text-white bg-green(500 hover:600) focus:(outline-none ring(2 offset-2 green-500)) disabled:(bg-green-200 cursor-default)`}
class="p-3 border border-transparent rounded-full text-white bg-green(500 hover:600) focus:(outline-none ring(2 offset-2 green-500)) disabled:(bg-green-200 cursor-default)}"
/>
);
}