From 21b3f9c02956c625c576c6787ab10409aab0618d Mon Sep 17 00:00:00 2001 From: Matthew Shao Date: Mon, 17 Jul 2017 15:32:52 +0800 Subject: [PATCH] [web] Update OptionMaster. --- web/src/js/components/Modal/OptionMaster.jsx | 86 +++++++------------- web/src/js/ducks/options.js | 31 ++++--- 2 files changed, 44 insertions(+), 73 deletions(-) diff --git a/web/src/js/components/Modal/OptionMaster.jsx b/web/src/js/components/Modal/OptionMaster.jsx index 32f5bb4b1..5befc34a8 100644 --- a/web/src/js/components/Modal/OptionMaster.jsx +++ b/web/src/js/components/Modal/OptionMaster.jsx @@ -10,14 +10,12 @@ PureBooleanOption.PropTypes = { } function PureBooleanOption({ value, onChange, ...props}) { - let onMouseEnter = () => { props.onMouseEnter() }, - onMouseLeave = () => { props.onMouseLeave() } return ( ) } @@ -28,11 +26,7 @@ PureStringOption.PropTypes = { } function PureStringOption( { value, onChange, ...props }) { - let onKeyDown = (e) => {e.stopPropagation()}, - onFocus = () => { props.onFocus() }, - onBlur = () => { props.onBlur() }, - onMouseEnter = () => { props.onMouseEnter() }, - onMouseLeave = () => { props.onMouseLeave() } + let onKeyDown = (e) => {e.stopPropagation()} return (
) @@ -55,11 +49,7 @@ PureNumberOption.PropTypes = { } function PureNumberOption( {value, onChange, ...props }) { - let onKeyDown = (e) => {e.stopPropagation()}, - onFocus = () => { props.onFocus() }, - onBlur = () => { props.onBlur() }, - onMouseEnter = () => { props.onMouseEnter() }, - onMouseLeave = () => { props.onMouseLeave() } + let onKeyDown = (e) => {e.stopPropagation()} return ( ) } @@ -81,20 +71,16 @@ PureChoicesOption.PropTypes = { } function PureChoicesOption( { value, onChange, name, choices, ...props}) { - let onFocus = () => { props.onFocus() }, - onBlur = () => { props.onBlur() }, - onMouseEnter = () => { props.onMouseEnter() }, - onMouseLeave = () => { props.onMouseLeave() } return (