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

@@ -14,6 +14,7 @@ const Platform = require('Platform');
const Position = require('Position');
const React = require('React');
const ReactNative = require('ReactNative');
const StyleSheet = require('StyleSheet');
const TVEventHandler = require('TVEventHandler');
const TouchEventUtils = require('fbjs/lib/TouchEventUtils');
const UIManager = require('UIManager');
@@ -858,17 +859,25 @@ const Touchable = {
return (
<View
pointerEvents="none"
style={{
position: 'absolute',
borderColor: hexColor.slice(0, -2) + '55', // More opaque
borderWidth: 1,
borderStyle: 'dashed',
backgroundColor: hexColor.slice(0, -2) + '0F', // Less opaque
...debugHitSlopStyle,
}}
style={[
styles.debug,
{
borderColor: hexColor.slice(0, -2) + '55', // More opaque
backgroundColor: hexColor.slice(0, -2) + '0F', // Less opaque
...debugHitSlopStyle,
},
]}
/>
);
},
};
const styles = StyleSheet.create({
debug: {
position: 'absolute',
borderWidth: 1,
borderStyle: 'dashed',
},
});
module.exports = Touchable;