mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-23 12:07:26 +08:00
Allow component styles to be editable in React Dev Tools
This commit is contained in:
@@ -1,6 +1,14 @@
|
||||
import flattenStyle from './flattenStyle';
|
||||
import StyleRegistry from './registry';
|
||||
|
||||
// allow component styles to be editable in React Dev Tools
|
||||
if (process.env.NODE_ENV !== 'production') {
|
||||
const { canUseDOM } = require('fbjs/lib/ExecutionEnvironment');
|
||||
if (canUseDOM && window.__REACT_DEVTOOLS_GLOBAL_HOOK__) {
|
||||
window.__REACT_DEVTOOLS_GLOBAL_HOOK__.resolveRNStyle = flattenStyle;
|
||||
}
|
||||
}
|
||||
|
||||
const absoluteFillObject = {
|
||||
position: 'absolute',
|
||||
left: 0,
|
||||
|
||||
Reference in New Issue
Block a user