feat: twind plugin (#513)
This adds a first-party twind plugin to use twind for styling.
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
/** @jsx h */
|
||||
import { h } from "preact";
|
||||
import { tw } from "@twind";
|
||||
|
||||
export default function NavigationBar(props: { active: string }) {
|
||||
const items = [
|
||||
@@ -15,13 +14,13 @@ export default function NavigationBar(props: { active: string }) {
|
||||
];
|
||||
|
||||
return (
|
||||
<nav class={tw`bg-green-200 py-2`}>
|
||||
<ul class={tw`flex justify-center gap-8 mx-4`}>
|
||||
<nav class="bg-green-200 py-2">
|
||||
<ul class="flex justify-center gap-8 mx-4">
|
||||
{items.map((item) => (
|
||||
<li>
|
||||
<a
|
||||
href={item.href}
|
||||
class={tw`text-gray-600 hover:underline ${
|
||||
class={`text-gray-600 hover:underline ${
|
||||
props.active == item.href ? "font-bold" : ""
|
||||
}`}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user