Open robertschank opened 6 years ago
I cannot reproduce your issue with gutterWidth
.
In shiny, we're using a patched version of the Grid
component to fix #19, but use Row
and Col
as provided - that works as expected, without wrapping our App
component in withTheme
, and without passing the theme around manually.
Here's our Grid story. Switch between the "Default" and "Oppskrift" themes in the top navigation bar to see that the gutterWidth changes dynamically.
Here's our modified Grid
component
Do you still have issues after #87 was merged?
@misund I'm experiencing this issue currently on the latest version - unless I place theme={theme} on every single child row and column (where theme = the provided example theme object in the Readme), the props of theme.flexboxgrid.gutterWidth and theme.flexboxgrid.outerMargin don't actually get read or used. This includes if I use container="fluid". If I place theme on every single
desired outcome:
All descendents of which are Grid, Rows and Cols take config from theme in the
index.js
fileactual behavior:
default gutterwidth and outerMargin are passed unless theme is directly called.
So we are presently passing theme over and over again down the app.... (see portion of code below)
What could I/we do differently to get the desired outcome?
in our
/index.js
in our
App.js
lots ofprops
passing using Styled-ComponentswithTheme(Component)
just to explain the madness; it continues to each child component this is
login/index.js
We'd need to continue with all of and its
May be related to:
https://github.com/LoicMahieu/react-styled-flexboxgrid/issues/84 https://github.com/LoicMahieu/react-styled-flexboxgrid/issues/19