mirror of https://github.com/franjsco/tick3t
refactor: button component
This commit is contained in:
parent
e3848b4c2d
commit
b3166a710e
|
@ -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 (
|
||||
<ButtonBootstrap
|
||||
onClick={this.props.onClick}
|
||||
tag={this.props.tag}
|
||||
to={this.props.to}
|
||||
style={style}
|
||||
>
|
||||
{this.props.children}
|
||||
</ButtonBootstrap>
|
||||
|
||||
);
|
||||
}
|
||||
const Button = (props) => {
|
||||
return (
|
||||
<ButtonBootstrap
|
||||
onClick={props.onClick}
|
||||
tag={props.tag}
|
||||
to={props.to}
|
||||
style={style}
|
||||
>
|
||||
{props.children}
|
||||
</ButtonBootstrap>
|
||||
)
|
||||
}
|
||||
|
||||
export default Button;
|
Loading…
Reference in New Issue