Description
I'm running into a TypeScript error when using a Box component built with rainbow-sprinkles as a Button. Here is a screenshot of the error:

Here is the Box component: https://github.com/richbachman/vega-ui/blob/main/packages/ui/src/primitives/Box/src/index.tsx
Here are the atoms I'm passing to Rainbox Sprinkles: https://github.com/richbachman/vega-ui/blob/main/packages/ui/src/styles/style-props.css.ts
The Button component consists of a main component which loads separate components depending on the variant:
I know I'm passing a lot of dynamicProperties in the defineProperties function. Maybe too many?
Let me know if you have any ideas on why this might be happening. Thanks!
Also note this is very much a WIP, so there's some commented code and other libraries being used to test different ideas. I'd really like to stick with rainbow-sprinkles though.
Expected Behaviour
I expect there to be no TypeScript error.
Actual Behaviour
There's a TypeScript error. This only appears to happen when type checking and in VSCode. The Storybook and the build will run fine.
Affected Version
0.15.2
Steps to Reproduce
- Feel free to pull the repo
- Run
pnpm install
- Run
pnpm build
- Run
pnpm type-check to see the error
Checklist
Description
I'm running into a TypeScript error when using a Box component built with rainbow-sprinkles as a Button. Here is a screenshot of the error:
Here is the Box component: https://github.com/richbachman/vega-ui/blob/main/packages/ui/src/primitives/Box/src/index.tsx
Here are the atoms I'm passing to Rainbox Sprinkles: https://github.com/richbachman/vega-ui/blob/main/packages/ui/src/styles/style-props.css.ts
The Button component consists of a main component which loads separate components depending on the variant:
I know I'm passing a lot of
dynamicPropertiesin thedefinePropertiesfunction. Maybe too many?Let me know if you have any ideas on why this might be happening. Thanks!
Also note this is very much a WIP, so there's some commented code and other libraries being used to test different ideas. I'd really like to stick with rainbow-sprinkles though.
Expected Behaviour
I expect there to be no TypeScript error.
Actual Behaviour
There's a TypeScript error. This only appears to happen when type checking and in VSCode. The Storybook and the build will run fine.
Affected Version
0.15.2
Steps to Reproduce
pnpm installpnpm buildpnpm type-checkto see the errorChecklist