Skip to content

Commit

Permalink
Replace "elevation" in RNTester rows with box-shadow (facebook#46076)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: facebook#46076

This will add the shadows to iOS as well. let's see if anyone notices 🙂. I also removed dead styles, and removed some of the extra (excessive) padding specific to Android where the previous shadows would overlap.

Changelog: [Internal]

Reviewed By: rshest

Differential Revision: D61421903
  • Loading branch information
NickGerleman authored and facebook-github-bot committed Aug 20, 2024
1 parent 7027eac commit 57929c2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 47 deletions.
12 changes: 4 additions & 8 deletions packages/rn-tester/js/components/RNTPressableRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,20 +70,16 @@ const styles = StyleSheet.create({
justifyContent: 'center',
paddingHorizontal: 15,
paddingVertical: 12,
marginVertical: Platform.select({ios: 4, android: 8}),
marginHorizontal: 15,
overflow: 'hidden',
elevation: 5,
backgroundColor: Platform.select({ios: '#FFFFFF', android: '#F3F8FF'}),
marginVertical: 4,
marginHorizontal: 16,
experimental_boxShadow: '0 2px 4px -1px rgba(0, 0, 0, 0.25)',
borderRadius: 8,
},
descriptionText: {
fontSize: 12,
lineHeight: 20,
marginBottom: 5,
},
pressed: {
elevation: 3,
},
topRowStyle: {
flexDirection: 'row',
justifyContent: 'space-between',
Expand Down
9 changes: 0 additions & 9 deletions packages/rn-tester/js/components/RNTesterModuleList.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,6 @@ const styles = StyleSheet.create({
fontWeight: '500',
fontSize: 11,
},
row: {
justifyContent: 'center',
paddingHorizontal: 15,
paddingVertical: 12,
marginVertical: Platform.select({ios: 4, android: 8}),
marginHorizontal: 15,
overflow: 'hidden',
elevation: 5,
},
topRowStyle: {
flexDirection: 'row',
justifyContent: 'space-between',
Expand Down
30 changes: 0 additions & 30 deletions packages/rn-tester/js/components/RNTesterNavbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,30 +128,10 @@ const RNTesterNavbar = ({
export const navBarHeight = 65;

const styles = StyleSheet.create({
floatContainer: {
flex: 1,
zIndex: 2,
alignItems: 'center',
},
buttonContainer: {
flex: 1,
flexDirection: 'row',
},
floatingButton: {
top: -20,
width: 50,
height: 50,
borderRadius: 500,
alignContent: 'center',
shadowColor: 'black',
shadowOffset: {
height: 5,
width: 0,
},
shadowOpacity: 0.9,
shadowRadius: 10,
elevation: 5,
},
componentIcon: {
width: 20,
height: 20,
Expand All @@ -166,16 +146,6 @@ const styles = StyleSheet.create({
borderTopWidth: 2,
borderColor: '#005DFF',
},
centralBoxCutout: {
height: '100%',
width: '100%',
position: 'absolute',
top: 0,
},
centerBox: {
flex: 1,
height: navBarHeight,
},
navButton: {
flex: 1,
height: navBarHeight,
Expand Down

0 comments on commit 57929c2

Please sign in to comment.