Fix inline styles warning in Libraries (#22161)

Summary:
Fixes `react-native/no-inline-styles` eslint warnings in the `Libraries` module.
Pull Request resolved: https://github.com/facebook/react-native/pull/22161

Differential Revision: D12946899

Pulled By: TheSavior

fbshipit-source-id: c97ffa50dd90529dabf30a3d2cb09476acc568cb
This commit is contained in:
Ignacio Olaciregui
2018-11-06 14:30:28 -08:00
committed by Facebook Github Bot
parent 69213eea95
commit 41eb2da33b
3 changed files with 76 additions and 46 deletions

View File

@@ -777,11 +777,7 @@ class CellRenderer extends React.Component<CellProps> {
if (DEBUG) {
infoLog('render cell ' + this.props.rowIndex);
const Text = require('Text');
debug = (
<Text style={{backgroundColor: 'lightblue'}}>
Row: {this.props.rowIndex}
</Text>
);
debug = <Text style={styles.debug}>Row: {this.props.rowIndex}</Text>;
}
const style = this._includeInLayoutLatch ? styles.include : styles.remove;
return (
@@ -819,6 +815,9 @@ const styles = StyleSheet.create({
right: -removedXOffset,
opacity: DEBUG ? 0.1 : 0,
},
debug: {
backgroundColor: 'lightblue',
},
});
module.exports = WindowedListView;