Warning: Failed Context Types: Invalid context `_radiumStyleKeeper` of type `StyleKeeper` supplied to `Grid`, expected instance of `StyleKeeper`. Check the render method of `StatelessComponent`.
export const Row = Radium(({
children,
style,
align,
...rest
}) => {
const _styles = [
{ display: 'flex' },
align && align >= 1 && align <= 9 &&
{
alignItems: rowAlignItems(align),
justifyContent: rowJustifyContent(align)
}
]
return (
<div
style={ _styles.concat(style) }
{...rest}
>
{ children }
</div>
)
})
export const ListItem = ({
children,
style,
isFirst,
...rest
}) => {
const _styles = [
{
backgroundColor: COLOR.LIST_ITEM
},
!isFirst &&
{
marginTop: 1
}
]
return (
<Row
style={ _styles.concat(style) }
{...rest}
>
{ children }
</Row>
)
}
const closeIcon = require('./../../img/close.icon.svg')
....
background: `url(data:image/svg+xml;utf8,${closeIcon})`,
....
Should this work?
Hi all - Newb Radium question: Can I set the style on a component programmatically? Let's say I have styles called styles.full and styles.partial. Instead of:
style={[
styles.full
]}
I want something like:
style={[
{myState.style}
]}
Is that possible? where myState.style = 'styles.full'