docs: update twindv1 example to resolve type issue (#1467)
This commit is contained in:
@@ -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).
|
||||
|
||||
Reference in New Issue
Block a user