You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On a fresh install of minimal-blog theme, when I shadow a file (e.g. footer.tsx) that have sx property of component, VS code shows me error:
(JSX attribute) sx: {
my: number;
}
Type '{ children: Element; sx: { my: number; }; }' is not assignable to type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'.
Property 'sx' does not exist on type 'DetailedHTMLProps<HTMLAttributes<HTMLElement>, HTMLElement>'.ts(2322)
This error is shown in VS code and not in CLI during develop or build command
I solve this issue by npm i @types/theme-ui (satminav/support#3) but it gives me other error on line like import { jsx, Link } from "theme-ui";. So I removed package @types/theme-ui
Steps to reproduce
Download and install fresh gatsby minimal blog theme and showdow any file (e.g. footer.tsx) that have sx property on component
Expected result
Error should not be produced
Actual result
Error is produced
Environment
Run gatsby info --clipboard in your project directory and paste the output here.
This isn't related to the theme itself but rather that Theme UI doesn't ship with the correct types yet and your VS Code seems to have TypeScript checker on or something. For now you'll need to ignore those errors until Theme UI ships with its correct types :)
We're marking this issue as answered and closing it for now but please feel free to comment here if you would like to continue this discussion. We also recommend heading over to our communities if you have questions that are not bug reports or feature requests. We hope we managed to help and thank you for using Gatsby!
Description
On a fresh install of minimal-blog theme, when I shadow a file (e.g. footer.tsx) that have
sx
property of component, VS code shows me error:This error is shown in VS code and not in CLI during
develop
orbuild
commandFile snippet:
I solve this issue by
npm i @types/theme-ui
(satminav/support#3) but it gives me other error on line likeimport { jsx, Link } from "theme-ui";
. So I removed package@types/theme-ui
Steps to reproduce
Download and install fresh gatsby minimal blog theme and showdow any file (e.g. footer.tsx) that have sx property on component
Expected result
Error should not be produced
Actual result
Error is produced
Environment
Run
gatsby info --clipboard
in your project directory and paste the output here.The text was updated successfully, but these errors were encountered: