Skip to content

Commit 091737b

Browse files
committed
refactor: parallax scroll to styled components
1 parent f14892a commit 091737b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/components/parallax-scroll.component.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import ParallaxScrollView from 'react-native-parallax-scroll-view';
44
import { Icon } from 'react-native-elements';
55
import styled from 'styled-components/native';
66

7-
import { colors, fonts, normalize } from 'config';
7+
import { colors, normalize, styledFonts } from 'config';
88

99
const STICKY_HEADER_HEIGHT = 62;
1010

@@ -28,7 +28,7 @@ const Background = styled.View`
2828
position: absolute;
2929
top: 0;
3030
background-color: ${colors.primaryDark};
31-
${props => props.style};
31+
height: ${props => props.height};
3232
`;
3333

3434
const StickySection = styled.View`
@@ -40,7 +40,7 @@ const StickySection = styled.View`
4040

4141
const StickySectionText = styled.Text`
4242
color: ${colors.white};
43-
${fonts.fontPrimaryBold};
43+
font-family: ${styledFonts.fontPrimaryBold};
4444
font-size: ${normalize(16)};
4545
margin: 10px;
4646
`;
@@ -109,7 +109,7 @@ export class ParallaxScroll extends Component {
109109
backgroundSpeed={10}
110110
renderBackground={() => (
111111
<View key="background">
112-
<Background style={{ height: this.state.parallaxHeaderHeight }} />
112+
<Background height={this.state.parallaxHeaderHeight} />
113113
</View>
114114
)}
115115
renderForeground={renderContent}

0 commit comments

Comments
 (0)