From a7ce3013ab051fb130b6967b54f3f41c7dd5a70e Mon Sep 17 00:00:00 2001 From: Francesco Esposito <33671357+frsposito@users.noreply.github.com> Date: Wed, 31 Jul 2019 15:54:20 +0200 Subject: [PATCH] refactor: Dropdown component --- src/components/DropDown.js | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/src/components/DropDown.js b/src/components/DropDown.js index 5465b90..0d3e456 100644 --- a/src/components/DropDown.js +++ b/src/components/DropDown.js @@ -1,32 +1,24 @@ -import React, { Component } from 'react'; +import React from 'react'; import { Input } from 'reactstrap'; -class DropDown extends Component { - constructor(props) { - super(props); +const DropDown = (props) => { + let options = props.options; + options = options.map((opt) => { + return + }); - this.state = {}; - } - - render() { - let options = this.props.options; - options = options.map((opt) => { - return - }); - - return( + return ( - { options } + {options} - ); - } + ); } export default DropDown; \ No newline at end of file