Fix extra margin around Open and Download links

This commit is contained in:
Alex Liebowitz 2017-01-17 05:50:38 -05:00
parent 839c42bc3a
commit e6563f26b8

View file

@ -25,9 +25,10 @@ export let Link = React.createClass({
return null;
}
/* The way the class name is generated here is a mess -- refactor */
const className = (this.props.className || '') +
(this.props.button ? ' button-block button-' + this.props.button : '') +
(!this.props.className && !this.props.button ? 'button-text' : '') +
(this.props.disabled ? ' disabled' : '');
let content;
@ -44,7 +45,7 @@ export let Link = React.createClass({
return (
<a className={className} href={this.props.href || 'javascript:;'} title={this.props.title}
onClick={this.handleClick} {... 'style' in this.props ? {style: this.props.style} : {}}>
{this.props.button
{('button' in this.props) && this.props.button != 'text'
? <span className="button__content">{content}</span>
: content}
</a>