- {name}
+
+ onMouseEnter() {
+ console.log(this.state)
+ this.setState({ mousefocus: true })
+ }
+
+ onMouseLeave() {
+ this.setState({ mousefocus: false })
+ }
+
+ onFocus() {
+ console.log(this.state)
+ this.setState({ focus: true })
+ }
+
+ onBlur() {
+ this.setState({ focus: false })
+ }
+
+ render() {
+ const { name, children } = this.props
+ const { option, focus, mousefocus } = this.state
+ const WrappedComponent = this.WrappedComponent
+ return (
+
+
+ {name}
+
+
+
+ {(focus || mousefocus) && (
+
)}
+
-
-
-
-