From c60f2fc566142ff5ced33e8da6fceb7690c19814 Mon Sep 17 00:00:00 2001 From: Reed von Redwitz Date: Thu, 20 Jul 2023 21:04:54 +0200 Subject: [PATCH] docs: update twindv1 example to resolve type issue (#1467) --- docs/examples/using-twind-v1.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/examples/using-twind-v1.md b/docs/examples/using-twind-v1.md index fa865e09..bd162c5e 100644 --- a/docs/examples/using-twind-v1.md +++ b/docs/examples/using-twind-v1.md @@ -46,17 +46,19 @@ The twind config object has changed significantly in v1, so we must also go change `twind.config.ts`. A good base looks like this: ```ts -import { defineConfig } from "https://esm.sh/@twind/core@1.1.3"; +import { defineConfig, Preset } from "https://esm.sh/@twind/core@1.1.3"; import presetTailwind from "https://esm.sh/@twind/preset-tailwind@1.1.4"; import presetAutoprefix from "https://esm.sh/@twind/preset-autoprefix@1.0.7"; export default { ...defineConfig({ - presets: [presetTailwind(), presetAutoprefix()], + presets: [presetTailwind() as Preset, presetAutoprefix()], }), selfURL: import.meta.url, }; ``` +(Note: the `as Preset` cast is required to fix a typing issue with twind.) + To see what other presets exist, you can go to the [twind docs](https://twind.style/presets).