Skip to content

CSS Type with config extensions #1125

Answered by rangitha
leo-petrucci asked this question in Help
Discussion options

You must be logged in to vote

The CSS type that ships with Stitches is generic. Use the type parameter to type it with your config:

// stitches.config.ts

import * as Stitches from "@stitches/react";

export type CSS = Stitches.CSS<typeof config>;
export const { config, ... } = Stitches.createStitches({ ... });

You could then use your own CSS type elsewhere!

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by leo-petrucci
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants