From fa452bf92cdb8306f1d88bc52bf6e955cceff05d Mon Sep 17 00:00:00 2001 From: Glenn Reyes Date: Thu, 19 Jul 2018 21:41:13 +0200 Subject: [PATCH] Decorators to hoc --- src/components/grape-browser/GrapeBrowser.js | 5 +++-- src/components/grape-input/GrapeInput.js | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/grape-browser/GrapeBrowser.js b/src/components/grape-browser/GrapeBrowser.js index 05611720..0bf4d49f 100644 --- a/src/components/grape-browser/GrapeBrowser.js +++ b/src/components/grape-browser/GrapeBrowser.js @@ -35,8 +35,7 @@ const browserWithInput = { /** * Uses all types of auto completes to provide end component. */ -@injectSheet(style) -export default class GrapeBrowser extends Component { +class GrapeBrowser extends Component { static propTypes = { isLoading: PropTypes.bool, placeholder: PropTypes.string, @@ -479,3 +478,5 @@ export default class GrapeBrowser extends Component { ) } } + +export default injectSheet(style)(GrapeBrowser) diff --git a/src/components/grape-input/GrapeInput.js b/src/components/grape-input/GrapeInput.js index 6b87cc38..b94d02cb 100644 --- a/src/components/grape-input/GrapeInput.js +++ b/src/components/grape-input/GrapeInput.js @@ -14,8 +14,7 @@ import HighlightedInput from '../highlighted-input/HighlightedInput' import { toMarkdown, fromMarkdown, getEmojiObjects } from './utils' -@injectSheet(style) -export default class GrapeInput extends Component { +class GrapeInput extends Component { static propTypes = { onSubmit: PropTypes.func, onAbort: PropTypes.func, @@ -197,3 +196,5 @@ export default class GrapeInput extends Component { ) } } + +export default injectSheet(style)(GrapeInput)