-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show new Rate screen on heart button press
List of changes: - Add new Rate screen - Add new Footer component - Update BottomNav and IconButton to allow for onPress functions - Update BottomNav and IconButton stories with onPress functions - Update Home component to navigate to the Rate screen when the heart icon button is pressed in the bottom nav - Update StoriesTest snapshot to reflect BottomNav and IconButton changes - Update HomeTest and its snapshot to reflect Home component changes - Add RateTest and its snapshot
- Loading branch information
Showing
24 changed files
with
332 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { StyleSheet } from 'react-native' | ||
|
||
import { Styles } from 'App/Themes' | ||
|
||
export default StyleSheet.create({...Styles}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React, { Component } from 'react' | ||
import { View } from 'react-native' | ||
|
||
import s from './Styles' | ||
|
||
export default class Footer extends Component { | ||
render () { | ||
const {containerStyle = undefined} = this.props | ||
return ( | ||
<View style={[s.footer, containerStyle]}> | ||
{this.props.children} | ||
</View> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import Start from './StartContainer' | ||
import Web from './WebContainer' | ||
|
||
export { | ||
Start, | ||
Web | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
|
||
import { Home } from './Screens' | ||
import Home from './Screens/Containers' | ||
|
||
export { | ||
Home | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import React, { Component } from 'react' | ||
import PropTypes from 'prop-types' | ||
|
||
import { Container, Footer, Card } from 'App/Components' | ||
|
||
export default class Screen extends Component { | ||
static propTypes = { | ||
onRatePress: PropTypes.func.isRequired | ||
} | ||
|
||
render () { | ||
const { onRatePress } = this.props | ||
return ( | ||
<Container> | ||
<Footer> | ||
<Card | ||
title='LOVING THE APP?' | ||
text={'Every rating means the world to us.\n\n★★★★★'} | ||
button='Rate' | ||
onPress={onRatePress} /> | ||
</Footer> | ||
</Container> | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React, { Component } from 'react' | ||
import { connect } from 'react-redux' | ||
|
||
import Screen from '../Components' | ||
|
||
export class RateContainer extends Component { | ||
onRatePress = () => { | ||
// TODO | ||
} | ||
|
||
render () { | ||
return ( | ||
<Screen | ||
ref={(ref) => { | ||
this.screen = ref | ||
}} | ||
{...this.props} | ||
onRatePress={this.onRatePress} | ||
/> | ||
) | ||
} | ||
} | ||
|
||
const mapStateToProps = (state) => { | ||
return { | ||
} | ||
} | ||
|
||
const mapDispatchToProps = (dispatch) => { | ||
return { | ||
} | ||
} | ||
|
||
export default connect(mapStateToProps, mapDispatchToProps)(RateContainer) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
import Rate from './Screens/Containers' | ||
|
||
export { | ||
Rate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { Home } from './Home' | ||
import { Rate } from './Rate' | ||
|
||
export { | ||
Home, | ||
Rate | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.