From b3166a710e7916f2931f900581a9504bb627745c Mon Sep 17 00:00:00 2001 From: Francesco Esposito <33671357+frsposito@users.noreply.github.com> Date: Wed, 31 Jul 2019 15:53:29 +0200 Subject: [PATCH] refactor: button component --- src/components/Button.js | 33 ++++++++++++--------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/src/components/Button.js b/src/components/Button.js index a0bb2a5..289747f 100644 --- a/src/components/Button.js +++ b/src/components/Button.js @@ -1,4 +1,4 @@ -import React, { Component } from 'react'; +import React from 'react'; import { Button as ButtonBootstrap } from 'reactstrap'; @@ -8,26 +8,17 @@ const style = { backgroundImage: 'linear-gradient(to left, #0eaed3, #8346f6)' }; -class Button extends Component { - constructor(props) { - super(props); - - this.state = {}; - } - - render() { - return ( - - {this.props.children} - - - ); - } +const Button = (props) => { + return ( + + {props.children} + + ) } export default Button; \ No newline at end of file