mirror of
				https://github.com/franjsco/tick3t
				synced 2025-06-05 22:19:18 +02:00 
			
		
		
		
	refactor: button component
This commit is contained in:
		| @@ -1,4 +1,4 @@ | |||||||
| import React, { Component } from 'react'; | import React from 'react'; | ||||||
| import { | import { | ||||||
|   Button as ButtonBootstrap |   Button as ButtonBootstrap | ||||||
| } from 'reactstrap'; | } from 'reactstrap'; | ||||||
| @@ -8,26 +8,17 @@ const style = { | |||||||
|   backgroundImage: 'linear-gradient(to left, #0eaed3, #8346f6)' |   backgroundImage: 'linear-gradient(to left, #0eaed3, #8346f6)' | ||||||
| }; | }; | ||||||
|  |  | ||||||
| class Button extends Component { | const Button = (props) => { | ||||||
|   constructor(props) { |  | ||||||
|     super(props); |  | ||||||
|  |  | ||||||
|     this.state = {}; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   render() { |  | ||||||
|   return ( |   return ( | ||||||
|     <ButtonBootstrap |     <ButtonBootstrap | ||||||
|         onClick={this.props.onClick} |     onClick={props.onClick} | ||||||
|         tag={this.props.tag} |     tag={props.tag} | ||||||
|         to={this.props.to} |     to={props.to} | ||||||
|     style={style} |     style={style} | ||||||
|   > |   > | ||||||
|         {this.props.children} |     {props.children} | ||||||
|   </ButtonBootstrap> |   </ButtonBootstrap> | ||||||
|  |   ) | ||||||
|     ); |  | ||||||
|   } |  | ||||||
| } | } | ||||||
|  |  | ||||||
| export default Button; | export default Button; | ||||||
		Reference in New Issue
	
	Block a user