Created
November 30, 2016 10:53
-
-
Save vojtatranta/fa55bde2c06c3921329ffdf343cd5c48 to your computer and use it in GitHub Desktop.
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
// před tim | |
<TouchableOpacity onPress={() => this.handleToggleDay('Mo')} style={[styles.weekIcontouch, this.selected('Mo')]}> | |
<Text style={[styles.weekIcon, this.selectedText('Mo')]}>{I18n.t('_general.week.mondayShort')}</Text> | |
</TouchableOpacity> | |
<TouchableOpacity onPress={() => this.handleToggleDay('Tu')}> | |
<Text>{I18n.t('_general.week.tuesdayShort')}</Text> | |
</TouchableOpacity> | |
... a dalsi dny v tydnu | |
//komponenta | |
class TouchableDay extends React.Component { | |
_handlePress = () => { | |
this.props.onDayPress(this.props.dayCode) | |
} | |
return() { | |
return ( | |
<TouchableOpacity onPresst={this._handlePress} style={this.props.style}> | |
{this.props.children} | |
</TouchableOpacity> | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment