我在我的React Native项目中有一些颜色,想知道是否能够像使用SASS那样将这些颜色存储在变量中,命名并保存在单独的文件中。下面是一些输入字段的样式示例。
module.exports = StyleSheet.create({
textInput:{
backgroundColor: '#fff',
color: '#666',
height: 60,
marginBottom: 20,
marginLeft: 20,
marginRight: 20,
paddingLeft: 10,
paddingRight: 10,
}
});
我想知道是否可以做类似于这个(SASS)的事情:
$cornflower-blue: #6195ED;
(与其他颜色变量在单独的文件中)article {
background-color: $cornflower-blue;
}
感谢您提前阅读。
谢谢。