(I am using vscode with typescript & NextJs)
I just made a single div component with plasmic and I try to pass the style props to it. But it gives me an error and I find very weird cases.
The name of component I made is “testComp”.
• Case 1
<PlasmicTest
testComp={{
style: { height: 300 },
}}
/>
…ERROR
————————————————————
If I pass any other props with style, then it works.
• Case 2
<PlasmicTest
testComp={{
style: { height: 300 },
className: “??” <— anything
}}
/>
…NO ERROR
————————————————————
And this works also.
• Case 3 in testComp.tsx
export interface TestCompProps extends DefaultTestCompProps {
style?: React.CSSProperties;
}
…NO ERROR
———————————————————
Can someone explains why this happens?