You've already forked joplin
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:
@ -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 {
|
||||
|
29
ReactNativeClient/src/components/offline-button.js
Normal file
29
ReactNativeClient/src/components/offline-button.js
Normal 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 };
|
Reference in New Issue
Block a user