diff options
| author | Andrej Mihajlov <and@mullvad.net> | 2018-06-01 16:13:10 +0200 |
|---|---|---|
| committer | Andrej Mihajlov <and@mullvad.net> | 2018-06-05 12:11:55 +0200 |
| commit | ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087 (patch) | |
| tree | b1f7754eb50896ab3681e35fa4e08be642b940c9 /app/components/Switch.android.js | |
| parent | 5852c980980de53e00d76a0bdb4b41bf5c0f5b39 (diff) | |
| download | mullvadvpn-ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087.tar.xz mullvadvpn-ca2f6fbfcad7b73d4ea63ef46cb1cab943ec9087.zip | |
Add formatted source code
Diffstat (limited to 'app/components/Switch.android.js')
| -rw-r--r-- | app/components/Switch.android.js | 18 |
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)} />; } } |
