๐ BUG: upgrade @astrojs/check from 0.3.2 to 0.3.3 astro check command throws error within React components
Closed this issue ยท 1 comments
vorant94 commented
Describe the Bug
after upgrade @astrojs/check
from 0.3.2 to 0.3.3 if I run astro check
it will throw error Property 'className' does not exist on type
on each usage of native HTML elements with className inside React JSX attribute
example component that will throw
export function Title({
children,
inline,
}: PropsWithChildren<TitleProps>): ReactElement {
return (
<h6
className={classNames(...THEME.primaryText, 'text-lg font-medium', {
'inline-block': inline,
'mb-0': inline,
})}>
{children}
</h6>
);
}
export interface TitleProps {
inline?: boolean;
}
Steps to Reproduce
- npm init astro
- npx astro add react
- create a typescript react component and use 'className' attribute in it
- astro check throws an error
Princesseuh commented
Duplicate of #727