|
|
|
@ -8,12 +8,13 @@ class WordsBtn extends Component {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
render() {
|
|
|
|
|
let{to, href,target}=this.props
|
|
|
|
|
let{to, href,targets}=this.props
|
|
|
|
|
return(
|
|
|
|
|
<React.Fragment>
|
|
|
|
|
{
|
|
|
|
|
to==undefined ?
|
|
|
|
|
<a href={href || "javascript:void(0)"} target={target} onClick={this.props.onClick} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</a>
|
|
|
|
|
to==undefined&&targets==undefined ?
|
|
|
|
|
<a href={href || "javascript:void(0)"} onClick={this.props.onClick} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</a>:
|
|
|
|
|
target!=undefined? <a href={href || "javascript:void(0)"} target="_blank" onClick={this.props.onClick} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</a>
|
|
|
|
|
:
|
|
|
|
|
<Link to={to} className={"btn "+`${map[this.props.style]} ${this.props.className}`}>{this.props.children}</Link>
|
|
|
|
|
}
|
|
|
|
|