Skip to content

Commit 8901a0b

Browse files
rickhanloniifacebook-github-bot
authored andcommitted
LogBox - Better shadow for fatal button
Summary: This diff lowers the intensity of the shadow on the fatal button based on user feedback that it's weird. Changelog: [Internal] Reviewed By: cpojer Differential Revision: D18353498 fbshipit-source-id: 9133aae02e5609e181a55289f349ea6a9e9fdaf6
1 parent 118e4d2 commit 8901a0b

File tree

2 files changed

+52
-34
lines changed

2 files changed

+52
-34
lines changed

Libraries/LogBox/UI/LogBoxInspectorFooter.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ type Props = $ReadOnly<{|
2929
function LogBoxInspectorFooter(props: Props): React.Node {
3030
if (props.fatalType === 'fatal' || props.fatalType === 'syntax') {
3131
return (
32-
<View style={styles.root}>
32+
<View style={[styles.root, fatalStyles.root]}>
3333
<LogBoxButton
3434
backgroundColor={{
3535
default: LogBoxStyle.getFatalColor(),
@@ -83,6 +83,9 @@ function FooterButton(props: ButtonProps): React.Node {
8383
}
8484

8585
const fatalStyles = StyleSheet.create({
86+
root: {
87+
shadowColor: LogBoxStyle.getBackgroundDarkColor(1),
88+
},
8689
button: {
8790
flex: 1,
8891
},

Libraries/LogBox/UI/__tests__/__snapshots__/LogBoxInspectorFooter-test.js.snap

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,23 @@
33
exports[`LogBoxInspectorFooter should render fatal button 1`] = `
44
<View
55
style={
6-
Object {
7-
"backgroundColor": "rgba(51, 51, 51, 1)",
8-
"elevation": 1,
9-
"flexDirection": "row",
10-
"shadowColor": "#000",
11-
"shadowOffset": Object {
12-
"height": -2,
13-
"width": 0,
6+
Array [
7+
Object {
8+
"backgroundColor": "rgba(51, 51, 51, 1)",
9+
"elevation": 1,
10+
"flexDirection": "row",
11+
"shadowColor": "#000",
12+
"shadowOffset": Object {
13+
"height": -2,
14+
"width": 0,
15+
},
16+
"shadowOpacity": 0.5,
17+
"shadowRadius": 2,
1418
},
15-
"shadowOpacity": 0.5,
16-
"shadowRadius": 2,
17-
}
19+
Object {
20+
"shadowColor": "rgba(34, 34, 34, 1)",
21+
},
22+
]
1823
}
1924
>
2025
<LogBoxButton
@@ -77,18 +82,23 @@ exports[`LogBoxInspectorFooter should render fatal button 1`] = `
7782
exports[`LogBoxInspectorFooter should render fatal button for syntax erorr 1`] = `
7883
<View
7984
style={
80-
Object {
81-
"backgroundColor": "rgba(51, 51, 51, 1)",
82-
"elevation": 1,
83-
"flexDirection": "row",
84-
"shadowColor": "#000",
85-
"shadowOffset": Object {
86-
"height": -2,
87-
"width": 0,
85+
Array [
86+
Object {
87+
"backgroundColor": "rgba(51, 51, 51, 1)",
88+
"elevation": 1,
89+
"flexDirection": "row",
90+
"shadowColor": "#000",
91+
"shadowOffset": Object {
92+
"height": -2,
93+
"width": 0,
94+
},
95+
"shadowOpacity": 0.5,
96+
"shadowRadius": 2,
8897
},
89-
"shadowOpacity": 0.5,
90-
"shadowRadius": 2,
91-
}
98+
Object {
99+
"shadowColor": "rgba(34, 34, 34, 1)",
100+
},
101+
]
92102
}
93103
>
94104
<LogBoxButton
@@ -151,18 +161,23 @@ exports[`LogBoxInspectorFooter should render fatal button for syntax erorr 1`] =
151161
exports[`LogBoxInspectorFooter should render fatal for warning with a fatal 1`] = `
152162
<View
153163
style={
154-
Object {
155-
"backgroundColor": "rgba(51, 51, 51, 1)",
156-
"elevation": 1,
157-
"flexDirection": "row",
158-
"shadowColor": "#000",
159-
"shadowOffset": Object {
160-
"height": -2,
161-
"width": 0,
164+
Array [
165+
Object {
166+
"backgroundColor": "rgba(51, 51, 51, 1)",
167+
"elevation": 1,
168+
"flexDirection": "row",
169+
"shadowColor": "#000",
170+
"shadowOffset": Object {
171+
"height": -2,
172+
"width": 0,
173+
},
174+
"shadowOpacity": 0.5,
175+
"shadowRadius": 2,
162176
},
163-
"shadowOpacity": 0.5,
164-
"shadowRadius": 2,
165-
}
177+
Object {
178+
"shadowColor": "rgba(34, 34, 34, 1)",
179+
},
180+
]
166181
}
167182
>
168183
<LogBoxButton

0 commit comments

Comments
 (0)