1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-16 00:14:34 +02:00

Added support for navigation

This commit is contained in:
Laurent Cozic
2017-05-09 19:56:01 +00:00
parent 61ea8f2963
commit 7d7ee268f0
4 changed files with 213 additions and 90 deletions

View File

@ -6,14 +6,15 @@ import { _ } from 'src/locale.js';
class LoginButtonComponent extends Component {
render() {
return <Button onPress={this.props.onPress} title={_(this.props.label)} />
return <Button onPress={this.props.onPress} title={_("Login")} />
}
}
const LoginButton = connect(
(state) => {
return { label: state.myButtonLabel };
return {};
//return { label: state.myButtonLabel };
},
(dispatch) => {
return {

View File

@ -0,0 +1,29 @@
import React, { Component } from 'react';
import { connect } from 'react-redux'
import { Button } from 'react-native';
import { _ } from 'src/locale.js';
class OfflineButtonComponent extends Component {
render() {
return <Button onPress={this.props.onPress} title={_(this.props.label)} />
}
}
const OfflineButton = connect(
(state) => {
//return { label: state.myButtonLabel };
},
(dispatch) => {
return {
onPress: function() {
dispatch({
type: 'WORK_OFFLINE'
});
}
}
}
)(OfflineButtonComponent)
export { OfflineButton };