Closed
Description
Thanks for nice lib and I found 2 issues with react-shade:
- All events in Root is double fired
in simple app like this, I see TEST Clicked
logged twice in console
render(
<Root>
<button
onClick={() => {
console.log('TEST Clicked');
}}
>
TEST
</button>
</Root>,
$root
);
to fix this, I had to remove retarget
method in Root.ts line 40 // retarget(shadowRoot);
and fix line 57 {state.shadowRoot && createPortal(props.children, state.shadowRoot)}
- If I use styles object with
@keyframe
or@media
props in<Style>
component, their content renders in style's tag as [object Object] because it has deeper nested object then regular style's rule. I found work around by moving all@keyframe
or@media
directly to<styles>
but I think you need to fix it somewhere ininternal/css.ts
by checking if value is Object then do another Object.keys if it is.
Metadata
Metadata
Assignees
Labels
No labels