Skip to content

Commit 227aa96

Browse files
authored
Fix YellowBox in 0.62 (#28457)
1 parent 9101eaf commit 227aa96

File tree

3 files changed

+11
-73
lines changed

3 files changed

+11
-73
lines changed

Libraries/YellowBox/UI/YellowBoxImageSource.js

-59
This file was deleted.

Libraries/YellowBox/UI/YellowBoxInspectorHeader.js

+5-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ const SafeAreaView = require('../../Components/SafeAreaView/SafeAreaView');
1717
const StyleSheet = require('../../StyleSheet/StyleSheet');
1818
const Text = require('../../Text/Text');
1919
const View = require('../../Components/View/View');
20-
const YellowBoxImageSource = require('./YellowBoxImageSource');
2120
const YellowBoxPressable = require('./YellowBoxPressable');
2221
const YellowBoxStyle = require('./YellowBoxStyle');
2322

@@ -43,15 +42,15 @@ const YellowBoxInspectorHeader = (props: Props): React.Node => {
4342
<View style={styles.header}>
4443
<YellowBoxInspectorHeaderButton
4544
disabled={props.warnings[prevIndex] == null}
46-
image={YellowBoxImageSource.chevronLeft}
45+
image={require('../../LogBox/UI/LogBoxImages/chevron-left.png')}
4746
onPress={() => props.onSelectIndex(prevIndex)}
4847
/>
4948
<View style={styles.headerTitle}>
5049
<Text style={styles.headerTitleText}>{titleText}</Text>
5150
</View>
5251
<YellowBoxInspectorHeaderButton
5352
disabled={props.warnings[nextIndex] == null}
54-
image={YellowBoxImageSource.chevronRight}
53+
image={require('../../LogBox/UI/LogBoxImages/chevron-right.png')}
5554
onPress={() => props.onSelectIndex(nextIndex)}
5655
/>
5756
</View>
@@ -74,10 +73,7 @@ const YellowBoxInspectorHeaderButton = (
7473
onPress={props.disabled ? null : props.onPress}
7574
style={styles.headerButton}>
7675
{props.disabled ? null : (
77-
<Image
78-
source={{height: 16, uri: props.image, width: 16}}
79-
style={styles.headerButtonImage}
80-
/>
76+
<Image source={props.image} style={styles.headerButtonImage} />
8177
)}
8278
</YellowBoxPressable>
8379
);
@@ -99,6 +95,8 @@ const styles = StyleSheet.create({
9995
justifyContent: 'center',
10096
},
10197
headerButtonImage: {
98+
height: 14,
99+
width: 8,
102100
tintColor: YellowBoxStyle.getTextColor(1),
103101
},
104102
headerTitle: {

Libraries/YellowBox/UI/YellowBoxInspectorSourceMapStatus.js

+6-7
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ const Easing = require('../../Animated/src/Easing');
1515
const React = require('react');
1616
const StyleSheet = require('../../StyleSheet/StyleSheet');
1717
const Text = require('../../Text/Text');
18-
const YellowBoxImageSource = require('./YellowBoxImageSource');
1918
const YellowBoxPressable = require('./YellowBoxPressable');
2019
const YellowBoxStyle = require('./YellowBoxStyle');
2120

@@ -41,15 +40,13 @@ class YellowBoxInspectorSourceMapStatus extends React.Component<Props, State> {
4140

4241
render(): React.Node {
4342
let image;
43+
4444
switch (this.props.status) {
45-
case 'COMPLETE':
46-
image = YellowBoxImageSource.check;
47-
break;
4845
case 'FAILED':
49-
image = YellowBoxImageSource.alertTriangle;
46+
image = require('../../LogBox/UI/LogBoxImages/alert-triangle.png');
5047
break;
5148
case 'PENDING':
52-
image = YellowBoxImageSource.loader;
49+
image = require('../../LogBox/UI/LogBoxImages/loader.png');
5350
break;
5451
}
5552

@@ -66,7 +63,7 @@ class YellowBoxInspectorSourceMapStatus extends React.Component<Props, State> {
6663
this.props.status === 'PENDING' ? styles.pending : null,
6764
)}>
6865
<Animated.Image
69-
source={{height: 16, uri: image, width: 16}}
66+
source={image}
7067
style={StyleSheet.compose(
7168
styles.image,
7269
this.state.rotate == null
@@ -142,6 +139,8 @@ const styles = StyleSheet.create({
142139
backgroundColor: YellowBoxStyle.getTextColor(0.6),
143140
},
144141
image: {
142+
height: 14,
143+
width: 16,
145144
marginEnd: 4,
146145
tintColor: YellowBoxStyle.getBackgroundColor(1),
147146
},

0 commit comments

Comments
 (0)