Closed gungdeaditya closed 5 years ago
Yes, it is possible. Could you show the code how did you try?
I am having the same issue. Note that global styles is meant for only a couple of screens and so would really like to use the spread operator.
import EStyleSheet from 'react-native-extended-stylesheet';
import globalStyles from '../GlobalStyles';
const styles = EStyleSheet.create({
...globalStyles,
container: {
flex: 1,
},
});
import EStyleSheet from 'react-native-extended-stylesheet';
const globalStyles = EStyleSheet.create({
headerContainer: {
flex: 1,
alignSelf: 'center',
},
headerText: {
fontSize: '80rem',
}
});
export default globalStyles;
hi @edwang2007 !
Is it possible for you app to define global styles as raw object? For example:
GlobalStyles.js
export default {
headerContainer: {
flex: 1,
alignSelf: 'center',
},
headerText: {
fontSize: '80rem',
}
};
Component.js
import EStyleSheet from 'react-native-extended-stylesheet';
import globalStyles from '../GlobalStyles';
const styles = EStyleSheet.create({
...globalStyles,
container: {
flex: 1,
},
});
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Is it possible if we use spread operator to combine stylesheet, because I tried but had no succeed