My attempt to modify the props
of a material-ui Grid
component using styled-components was not successful. I initially tried:
const NavGrid = styled(Grid)`
direction: 'row';
`
Unfortunately, this approach did not yield the desired result. This led me to wonder if there is an alternative to setting properties like
<Grid container direction={'row'}>
through styled-components rather than inline?
I experimented with adding props
to my styled component in the following way:
const NavGrid = styled(Grid).attrs({
direction: 'row'
})``
I came across a potential solution being discussed here, but unfortunately, it did not work as expected.