Всем салют! пишу мобильное приложение на react native и у меня возник вопрос как можно стили поместить в 1 объект (StyleSheet.create(styles1,styles2))?
1 ответ
как можно стили поместить в 1 объект (StyleSheet.create(styles1,styles2))?
Например вот так
const obj = {
stl1: StyleSheet.create({
container: {
height: 100
}
}),
stl2: StyleSheet.create({
container: {
height: 200
}
})
}
// ...
<View style={obj.stl1.container}></View>
<View style={obj.stl2.container}></View>