Skip to content
New issue

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

allow any element #42

Open
lstkz opened this issue Mar 27, 2018 · 1 comment
Open

allow any element #42

lstkz opened this issue Mar 27, 2018 · 1 comment

Comments

@lstkz
Copy link

lstkz commented Mar 27, 2018

Currently, if you provide custom react components under <CSSGrid>, it will throw an error.
The code is here https://github.com/dantrain/react-stonecutter/blob/master/src/utils/assertIsElement.js

The solution is to wrap it with an extra <div>. Unfortunately, it doesn't work well for me because I also use react-dnd, and I have a weird bug on mobile.

Is possible to remove this validation? I am using a fork with this change and it works without any problems.
The custom component must only apply provided style to the main <div>.

@dantrain
Copy link
Owner

dantrain commented Apr 1, 2018

Yes I think this could do with a rethink. Perhaps an API closer to React Motion's render prop would be better? Anyway I will see about allowing switching the validation off and documenting the use of the provided style prop.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants