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

Replacing pui-react-grids with react-flexbox-grid? #7

Closed
code-propagator opened this issue Sep 22, 2017 · 3 comments
Closed

Replacing pui-react-grids with react-flexbox-grid? #7

code-propagator opened this issue Sep 22, 2017 · 3 comments

Comments

@code-propagator
Copy link

I found pui-react-grids doesn't work well for resizing views and this module causes pollution for global GUI styles.
I tried replacing pui-react-grids with react-flexbox-grid, which is better for local layout with Material-UI components.
However linking modified react-aztec as local-module fails.
How to make react-flexbox-grid version of Aztec?

@code-propagator
Copy link
Author

I've just succeeded to eliminate pui-react-grids without any modification with react-aztec module.
Taking a copy of Aztec.jsx file to my project and modify the definition of Row, Col for react-flexbox-grid was enough. The react-aztec is installed into node_module without any modifications.

Thank you.

@ajainvivek
Copy link
Owner

@code-propagator It would be great, if you could raise a PR for replacing pui-react-grids with react-flexbox-grid. That would be wonderful 👍

@code-propagator
Copy link
Author

code-propagator commented Sep 23, 2017

Thank you for a comment. Essentially in Aztec.jsx, only import lines were adjusted as follows.
For react-flexbox-grid, the Aztec form should be wrapped with <Aztec.../>.
Layout uses 12 basis grid columns instead of 24. That's all.
--- [copy of Aztex.jsx] ---
// import { Row, Col } from 'pui-react-grids'
import { Row, Col } from 'react-flexbox-grid'

import { DynamicComponent } from 'react-aztec/dist-modules/components/DynamicComponent'
import { generateLayout } from 'react-aztec/dist-modules/helpers/filter'
import mui from 'react-aztec/dist-modules/config/mui'
import validation from 'react-aztec/dist-modules/helpers/validation'

I like react-aztec better than redux-form.
The redux-form is not designed for multiple instances of a same form, needs tedious work for redux-form users.

Thank you!

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

No branches or pull requests

2 participants