summaryrefslogtreecommitdiffhomepage
path: root/app/components/Switch.android.js
diff options
context:
space:
mode:
Diffstat (limited to 'app/components/Switch.android.js')
-rw-r--r--app/components/Switch.android.js18
1 files changed, 6 insertions, 12 deletions
diff --git a/app/components/Switch.android.js b/app/components/Switch.android.js
index 17bb976186..4689107868 100644
--- a/app/components/Switch.android.js
+++ b/app/components/Switch.android.js
@@ -3,28 +3,22 @@ import * as React from 'react';
import { Switch as _Switch } from 'react-native';
export type SwitchProps = {
- isOn: boolean;
- onChange?: (isOn: boolean) => void;
+ isOn: boolean,
+ onChange?: (isOn: boolean) => void,
};
-type State = {
-};
+type State = {};
export default class Switch extends React.Component<SwitchProps, State> {
static defaultProps: SwitchProps = {
isOn: false,
- onChange: ()=>{},
+ onChange: () => {},
};
- state = {
- };
+ state = {};
render() {
const { isOn, ...otherProps } = this.props;
- return (
- <_Switch { ...otherProps }
- value={ isOn }
- onValueChange={ this.props.onChange(isOn) } />
- );
+ return <_Switch {...otherProps} value={isOn} onValueChange={this.props.onChange(isOn)} />;
}
}