This repository has been archived by the owner on Apr 14, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#50 Fix conflict with develop branch
- Loading branch information
Showing
62 changed files
with
3,765 additions
and
582 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,62 @@ | ||
import React, { Component } from 'react'; | ||
import { TouchableOpacity, View, Text, StyleSheet, Dimensions } from 'react-native'; | ||
import PropTypes from 'prop-types'; | ||
import { Icon } from 'react-native-elements'; | ||
|
||
/** | ||
Flashcard Button | ||
**/ | ||
class FlashButton extends Component { | ||
static propTypes = { | ||
iconName: PropTypes.string, | ||
textName: PropTypes.number, | ||
btnType: PropTypes.string.isRequired, | ||
} | ||
|
||
_renderIconButton(){ | ||
return ( | ||
<TouchableOpacity | ||
disabled={this.props.disabled} | ||
style={studyStyles.roundButton} | ||
onPress={() => this.props.onPress()} | ||
> | ||
<Icon name={ this.props.iconName } color='#fff' size={40}/> | ||
</TouchableOpacity> | ||
); | ||
} | ||
|
||
_renderTextButton(){ | ||
return ( | ||
<TouchableOpacity | ||
style={studyStyles.roundButtonText} | ||
onPress={() => this.props.onPress()} | ||
> | ||
<Text style={[studyStyles.textLg, studyStyles.textCenter, studyStyles.textWhite]}> | ||
{ this.props.textName }x | ||
</Text> | ||
</TouchableOpacity> | ||
); | ||
} | ||
|
||
render() { | ||
const autoHeight = { | ||
height: (Dimensions.get('window').width) * 0.2 | ||
} | ||
let type; | ||
if(this.props.btnType === 'icon') { | ||
type = this._renderIconButton(); | ||
} else { | ||
type = this._renderTextButton(); | ||
} | ||
return ( | ||
<View style={[studyStyles.boxButton, autoHeight]}> | ||
{ type } | ||
</View> | ||
); | ||
} | ||
} | ||
|
||
|
||
export default FlashButton; | ||
|
||
const studyStyles = require('../styles/study'); |
Oops, something went wrong.