Open zeshan-786 opened 3 months ago
Example
export const Container = styled.div.attrs<{ popover?: 'auto' | 'manual' }>(({ popover }) => ({ popover, // 'popover': 'auto' // tried static property as well but no luck }))` position: absolute; z-index: 1; display: flex; box-sizing: border-box; `
export const Popover = React.forwardRef<HTMLDivElement, Props>(function Popover( { children, popover = 'auto', ...props }, ref ) { const { isPopoverAvailable } = usePopover(); return ( <Container popover={isPopoverAvailable ? popover : undefined} role="dialog" ref={ref} {...props} > {children} </Container> ); });
We should get popover property on container
popover
We don't get popover on container in the div attributes but we get it react component
This seems to be caused by StyleSheetManager's shouldForwardProp, I removed this and solved the problem.
StyleSheetManager
shouldForwardProp
Issue
Example
Expected Behavior
We should get
popover
property on containerActual Behavior
We don't get
popover
on container in the div attributes but we get it react component