Open
Description
I often add conditional styles to my components and no-unused-styles
doesn't see that the style is actually used in the code.
const styles = StyleSheet.create({
container: {
padding: 1,
},
'container--critical': {
backgroundColor: MY_RED_CONST,
},
});
const Component = ({ shouldBeRed }) => (
<View style={[styles.container].concat(shouldBeRed ? styles['container--critical'] : [])}>
<Text>This is some text</Text>
</View>
);
Metadata
Metadata
Assignees
Labels
No labels