chore: update twind import map defaults in init.ts (#291)

This commit is contained in:
Luca Casonato
2022-06-27 14:35:34 +02:00
committed by GitHub
parent a2c97fdeac
commit 34fc5514f9
15 changed files with 37 additions and 28 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
/** @jsx h */
import { h } from "preact";
import { tw } from "../utils/twind.ts";
import { tw } from "@twind";
export function RoundedButton(props: h.JSX.HTMLAttributes<HTMLButtonElement>) {
return (
+1 -1
View File
@@ -1,6 +1,6 @@
/** @jsx h */
import { h } from "preact";
import { apply, tw } from "../utils/twind.ts";
import { apply, tw } from "@twind";
import {
CATEGORIES,
+1 -1
View File
@@ -1,6 +1,6 @@
/** @jsx h */
import { h } from "preact";
import { tw } from "../utils/twind.ts";
import { tw } from "@twind";
const LINKS = [
{
+1 -1
View File
@@ -1,6 +1,6 @@
/** @jsx h */
import { h } from "preact";
import { tw } from "../utils/twind.ts";
import { tw } from "@twind";
export function IconMinus() {
return (
+1 -1
View File
@@ -1,6 +1,6 @@
/** @jsx h */
import { h } from "preact";
import { tw } from "../utils/twind.ts";
import { tw } from "@twind";
export default function NavigationBar(props: { active: string }) {
const items = [
+1 -1
View File
@@ -1,6 +1,6 @@
/** @jsx h */
import { h } from "preact";
import { tw } from "../utils/twind.ts";
import { tw } from "@twind";
export default function WarningBanner() {
const warning = tw`bg-yellow-100 border(1 yellow-200) p-4 mb-4`;
+6 -2
View File
@@ -1,11 +1,15 @@
{
"imports": {
"$fresh/": "../",
"$twind": "https://esm.sh/twind@0.16.16",
"$twind/": "https://esm.sh/twind@0.16.16/",
"@twind": "./utils/twind.ts",
"twind": "https://esm.sh/twind@0.16.16",
"twind/": "https://esm.sh/twind@0.16.16/",
"preact": "https://esm.sh/preact@10.8.1",
"preact/": "https://esm.sh/preact@10.8.1/",
"preact-render-to-string": "https://esm.sh/preact-render-to-string@5.2.0?deps=preact@10.8.1",
"$semver/": "https://deno.land/x/semver@v1.4.0/"
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
import { h } from "preact";
import { useState } from "preact/hooks";
import { IS_BROWSER } from "$fresh/runtime.ts";
import { tw } from "../utils/twind.ts";
import { tw } from "@twind";
import { RoundedButton } from "../components/Button.tsx";
import { IconMinus, IconPlus } from "../components/Icons.tsx";
+1 -1
View File
@@ -2,7 +2,7 @@
/** @jsxFrag Fragment */
import { Fragment, h } from "preact";
import { useEffect, useRef, useState } from "preact/hooks";
import { tw } from "../utils/twind.ts";
import { tw } from "@twind";
import { Spring, WaveTank } from "../components/WaveTank.ts";
function easeInCirc(x: number) {
+2 -2
View File
@@ -5,8 +5,8 @@
/// <reference lib="deno.unstable" />
import { start } from "$fresh/server.ts";
import { virtualSheet } from "$twind/sheets";
import { setup, theme } from "./utils/twind.ts";
import { virtualSheet } from "twind/sheets";
import { setup, theme } from "@twind";
import routes from "./fresh.gen.ts";
+1 -1
View File
@@ -3,7 +3,7 @@
import { Fragment, h } from "preact";
import { Head } from "$fresh/runtime.ts";
import { Handlers, PageProps } from "$fresh/server.ts";
import { apply, tw } from "../../utils/twind.ts";
import { apply, tw } from "@twind";
import { frontMatter, gfm } from "../../utils/markdown.ts";
import DocsSidebar from "../../components/DocsSidebar.tsx";
+1 -1
View File
@@ -3,7 +3,7 @@
import { ComponentChildren, Fragment, h } from "preact";
import { asset, Head } from "$fresh/runtime.ts";
import { Handlers, PageProps } from "$fresh/server.ts";
import { tw } from "../utils/twind.ts";
import { tw } from "@twind";
import Counter from "../islands/Counter.tsx";
import LemonDrop from "../islands/LemonDrop.tsx";
import Footer from "../components/Footer.tsx";
+6 -3
View File
@@ -1,7 +1,9 @@
export * from "twind";
import { IS_BROWSER } from "$fresh/runtime.ts";
import { apply, setup, tw } from "$twind";
import * as colors from "$twind/colors";
export { apply, setup, tw };
import * as colors from "twind/colors";
import { setup } from "twind";
export const theme = {
colors: {
blue: colors.blue,
@@ -13,6 +15,7 @@ export const theme = {
transparent: "transparent",
},
};
if (IS_BROWSER) {
setup({ theme: { colors } });
}