react-styled-flexboxgrid
react-styled-flexboxgrid copied to clipboard
[request] - change Grid container theming
Hi,
have you planned to change the theme to allow the container props to have a string value ? It'll allow the dev to set its own size unit.
If it's not on the planning but you like the idea I can look into it
Example :
const theme = {
flexboxgrid: {
// ...
container: {
sm: '100%',
md: '80%',
lg: '70%'
},
// ...
}
}
Hi @carvallegro
No I haven't planned it. It could be possible I guess but I don't see the advantage for now. What would be your use case ?
I am obviously open for new feature but I want to keep the project simple ;)
You could try yourself but simply change some code in https://github.com/LoicMahieu/react-styled-flexboxgrid/blob/master/src/components/Grid.js#L17-L20
In my project I'm mainly using plain flexbox but in some forms I'm using your work because it's easier to create a proper layout. The issue I'm facing is because my forms are in div that can be smaller than 46, 61 or 76 rem.
My workaround so far is very simple :
const GridForm = Grid.extend`
width: 100%;
`
So there's no vital need for me, I'm totally comfortable with the present situation, I just thought that you'd be interested.
The decision is up to you but if you're down I can totally look into it during the weekend