【发布时间】:2018-08-03 10:12:20
【问题描述】:
我正在学习 react-native,我正在使用 styled-components。
在 react-native 中,我知道可以制作具有某种样式的组件,并且父级可以添加一些额外的样式,如下所示:
父.js
<CardSection style={{ flexDirection: 'column' }}>
Child.js
<View style={[styles.containerStyle, props.style]} >
然后 flexDirection 会自动添加到该元素的容器样式中。
在样式组件中是否有类似的事情?
【问题讨论】:
标签: react-native react-redux styled-components