Cant run build
See original GitHub issueHi, when i try to build this i get this error
Failed to compile.
./components/Navbar/Dropdown.component.tsx:124:15
Type error: Type '{ children: ({ open }: { open: any; }) => Element; as: string; }' is not assignable to type 'IntrinsicAttributes & {
theme?: Theme; }
& { children?: ReactNode; }'.
Property 'as' does not exist on type 'IntrinsicAttributes & { theme?: Theme; } & { children?: ReactNode; }'.
122 | export function Dropdown({ children, items, position }: StandardProps) {
123 | return (
> 124 | <StyledMenu as="div">
| ^
125 | {({ open }) => (
126 | <>
127 | <Menu.Button as={Fragment}>{children}</Menu.Button>
Appreciate any help!
Issue Analytics
- State:
- Created a year ago
- Comments:5 (2 by maintainers)
Top GitHub Comments
Thanks for reporting this issue. I’ve come across this error a few times in the past few weeks & am yet to find an exact cause other than some fault with the
yarn.lock
& the Babel / Emotion dependencies.I would like to find the true cause of this eventually, but currently I am in the process of moving away from Emotion.css in favour of purely using Windi CSS instead. See #53
i tried to delete node_modules folder and install the dependencies again, but it’s still showing that error. I’ll try to figure out what is happening if you want.