-
Notifications
You must be signed in to change notification settings - Fork 673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Theme typescript defs #995
Comments
The list of "autocompleted" keys are the same as keys of However, there's an index signature in ThemeStyles, so it should be possible to use Do you get an error if you try to use As a side note, the index signature should probably be
|
Thanks a lot for the answer |
0.3.1 is typed in DefinitelyTyped. There are some small problems. I'm using 0.4 alpha in my apps for quite a long time already. I recommend to give it a shot. There's only one runtime breaking change, and TypeScript should catch it. BTW Out of curiosity: How are you using
From TypeScript perspective, I'll check if 0.4 can be used in TS codebase without |
Thanks. I tried to update to the alphas, but had versioning problems that some of the packages were forcing a ‘highlight’ version of the css package. Resulting in an error of ‘ defaultBreakpoints Is not exported the @theme-ui/css’. I had upgraded all my theme-ui packages to alpha but using it within a gatsby setup - maybe gatsby was forcing the version, not sure. I am styling my own react-table derived component and it does have a tbody part and that is where i am using the tbody style. Hope it makes sense or maybe there some alternative? Thanks a lot for checking on a possible official release, much appreciated. Have a great weekend |
Okay, I think I get it. So you're extracting
Well, you can cascade tbody styles from
or write the styles inline in your component. |
I dont really want to write the styles inline for this particular case, but I am already using |
Okay, I think color-modes and mdx should at least have stub definitions before we publish 0.4.0.
There's also this error:
Theme UI monorepo happens to have |
Thanks for letting us know. Do you think 0.4 is close? |
Closing since 0.4 is published |
Is your feature request related to a problem? Please describe.
The
tbody
tag is not part of the Theme.styles definitionDescribe the solution you'd like
Possibly add
tbody
(possibly alsothead
) tags to the typescript definitions:theme-ui/packages/css/src/types.ts
Line 541 in e22df3c
Describe alternatives you've considered
//@ts-ignore
If the suggestion is ok, I can also submit a PR
The text was updated successfully, but these errors were encountered: