We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi,
Thanks for the good work. I am using it on my projects heavily.
Does it support https://github.com/styled-components/styled-components ? I am using the following code
import React from 'react'; import ReactHoverObserver from 'react-hover-observer'; import { FieldBlock, FieldBoundaries } from './block.style'; export default ({ children, admin }) => ( <FieldBlock className="hello"> <ReactHoverObserver> {admin && <div className="drag-me">Drag Here</div>} <div> <FieldBoundaries>{children}</FieldBoundaries> </div> </ReactHoverObserver> </FieldBlock> );
where the block.style.js is
import styled from 'styled-components'; import { palette } from 'styled-theme'; const FieldBlock = styled.div` ${'' /* background-color: #f4f4f5; */} background-color: ${palette('grey', 0)}; padding: 30px; `; const FieldBoundaries = styled.div` background-color: #ffffff; border: 2px dashed #e9ebf3; padding: 30px 20px; border-radius: 3px; `; export { FieldBlock, FieldBoundaries };
if I remove the styled component and put a div aroung children property it does not work.
import React from 'react'; import ReactHoverObserver from 'react-hover-observer'; import { FieldBlock, FieldBoundaries } from './block.style'; export default ({ children, admin }) => ( <FieldBlock className="hello"> <ReactHoverObserver> {admin && <div className="drag-me">Drag Here</div>} <div> {children}</div> </ReactHoverObserver> </FieldBlock> );
It works when I remove the styled component wrapper around children property.
import React from 'react'; import ReactHoverObserver from 'react-hover-observer'; import { FieldBlock, FieldBoundaries } from './block.style'; export default ({ children, admin }) => ( <FieldBlock className="hello"> <ReactHoverObserver> {admin && <div className="drag-me">Drag Here</div>} {children} </ReactHoverObserver> </FieldBlock> );
Am I missing something or it does not have support for styled component?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
Thanks for the good work. I am using it on my projects heavily.
Does it support https://github.com/styled-components/styled-components ? I am using the following code
where the block.style.js is
if I remove the styled component and put a div aroung children property it does not work.
It works when I remove the styled component wrapper around children property.
Am I missing something or it does not have support for styled component?
The text was updated successfully, but these errors were encountered: