From 5a08b195febed9f96b1af58ead0696576b4895db Mon Sep 17 00:00:00 2001 From: "shumi.lg" Date: Tue, 27 Nov 2018 18:57:27 +0800 Subject: [PATCH] Correct lint errors. --- demo/SwitchFormFieldDemo.js | 19 +++++++++++++++---- src/SwitchFormField.jsx | 5 +++-- src/index.js | 4 +++- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/demo/SwitchFormFieldDemo.js b/demo/SwitchFormFieldDemo.js index 60c5a0f..f848896 100644 --- a/demo/SwitchFormFieldDemo.js +++ b/demo/SwitchFormFieldDemo.js @@ -18,16 +18,27 @@ class Demo extends React.Component { }; } - handleChange (data) { - console.log('change', data) + handleChange(data) { + console.log('change', data); } render() { return (
- - + +
); diff --git a/src/SwitchFormField.jsx b/src/SwitchFormField.jsx index 72ab4e3..45be1a4 100644 --- a/src/SwitchFormField.jsx +++ b/src/SwitchFormField.jsx @@ -85,7 +85,8 @@ class SwitchFormField extends FormField { value={value ? RadioValues.On : RadioValues.Off} onChange={this.handleChange.bind(this)} style={{}} - className=""> + className="" + > @@ -116,7 +117,7 @@ class SwitchFormField extends FormField { const { checkedChildren, unCheckedChildren, useRadioGroup } = props; if (mode === Constants.MODE.EDIT) { - return useRadioGroup ? this.renderRadioGroup() : this.renderSwitch() + return useRadioGroup ? this.renderRadioGroup() : this.renderSwitch(); } return ( diff --git a/src/index.js b/src/index.js index 5f6b714..9805e36 100644 --- a/src/index.js +++ b/src/index.js @@ -6,4 +6,6 @@ * All rights reserved. */ -export default from './SwitchFormField'; +import SwitchFormField from './SwitchFormField'; + +export default SwitchFormField;