Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
Replace CSS boxShadow with react native compatible params
Browse files Browse the repository at this point in the history
  • Loading branch information
tanx committed Aug 9, 2018
1 parent 0c8dbc7 commit 45e8ce3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/component/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,15 @@ const styles = StyleSheet.create({
alignItems: 'center',
},
shadow: {
boxShadow: '0 2px 4px 0 rgba(0,0,0,0.3)',
shadowOffset: { width: 0, height: 2 },
shadowRadius: 4,
shadowColor: color.black,
shadowOpacity: 0.3,
zIndex: 1,
},
separator: {
boxShadow: `0 0.25px ${color.white}`,
shadowOffset: { width: 0, height: 0.25 },
shadowColor: color.white,
},
centerTitle: {
justifyContent: 'center',
Expand Down
5 changes: 3 additions & 2 deletions src/component/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ const itemStyles = StyleSheet.create({
alignItems: 'center',
height: 40,
marginTop: 1, // prevent box-shadow blinking when pressing item
boxShadow: `0 0.5px ${color.greyBorder}`,
shadowOffset: { width: 0, height: 0.5 },
shadowColor: color.greyBorder,
},
});

Expand Down Expand Up @@ -103,7 +104,7 @@ ListItem.propTypes = {

const headStyles = StyleSheet.create({
head: {
boxShadow: '0',
shadowOffset: { width: 0, height: 0 },
},
});

Expand Down
1 change: 1 addition & 0 deletions src/component/style.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const color = {
black: '#000000',
white: '#FFFFFF',
whiteBg: '#F5F5F5',
grey: '#C5C8CF',
Expand Down
3 changes: 2 additions & 1 deletion src/view/home.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ const qrStyles = StyleSheet.create({
separator: {
flex: 1,
height: 1,
boxShadow: `0 0.25px ${color.white}`,
shadowOffset: { width: 0, height: 0.25 },
shadowColor: color.white,
},
button: {
top: -19,
Expand Down

0 comments on commit 45e8ce3

Please sign in to comment.