Merge upstream!! #64 <3 <3
This commit is contained in:
		@@ -10,7 +10,7 @@ export default class ColumnHeader extends React.PureComponent {
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  static propTypes = {
 | 
			
		||||
    title: PropTypes.string.isRequired,
 | 
			
		||||
    title: PropTypes.node.isRequired,
 | 
			
		||||
    icon: PropTypes.string.isRequired,
 | 
			
		||||
    active: PropTypes.bool,
 | 
			
		||||
    multiColumn: PropTypes.bool,
 | 
			
		||||
 
 | 
			
		||||
@@ -14,6 +14,7 @@ export default class DropdownMenu extends React.PureComponent {
 | 
			
		||||
    size: PropTypes.number.isRequired,
 | 
			
		||||
    direction: PropTypes.string,
 | 
			
		||||
    ariaLabel: PropTypes.string,
 | 
			
		||||
    disabled: PropTypes.bool,
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  static defaultProps = {
 | 
			
		||||
@@ -68,9 +69,19 @@ export default class DropdownMenu extends React.PureComponent {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  render () {
 | 
			
		||||
    const { icon, items, size, direction, ariaLabel } = this.props;
 | 
			
		||||
    const { expanded } = this.state;
 | 
			
		||||
    const { icon, items, size, direction, ariaLabel, disabled } = this.props;
 | 
			
		||||
    const { expanded }   = this.state;
 | 
			
		||||
    const directionClass = (direction === 'left') ? 'dropdown__left' : 'dropdown__right';
 | 
			
		||||
    const iconStyle      = { fontSize: `${size}px`, width: `${size}px`, lineHeight: `${size}px` };
 | 
			
		||||
    const iconClassname  = `fa fa-fw fa-${icon} dropdown__icon`;
 | 
			
		||||
 | 
			
		||||
    if (disabled) {
 | 
			
		||||
      return (
 | 
			
		||||
        <div className='icon-button disabled' style={iconStyle} aria-label={ariaLabel}>
 | 
			
		||||
          <i className={iconClassname} aria-hidden />
 | 
			
		||||
        </div>
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    const dropdownItems = expanded && (
 | 
			
		||||
      <ul className='dropdown__content-list'>
 | 
			
		||||
@@ -80,8 +91,8 @@ export default class DropdownMenu extends React.PureComponent {
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
      <Dropdown ref={this.setRef} onShow={this.handleShow} onHide={this.handleHide}>
 | 
			
		||||
        <DropdownTrigger className='icon-button' style={{ fontSize: `${size}px`, width: `${size}px`, lineHeight: `${size}px` }} aria-label={ariaLabel}>
 | 
			
		||||
          <i className={`fa fa-fw fa-${icon} dropdown__icon`}  aria-hidden />
 | 
			
		||||
        <DropdownTrigger className='icon-button' style={iconStyle} aria-label={ariaLabel}>
 | 
			
		||||
          <i className={iconClassname} aria-hidden />
 | 
			
		||||
        </DropdownTrigger>
 | 
			
		||||
 | 
			
		||||
        <DropdownContent className={directionClass}>
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@ export default class Permalink extends React.PureComponent {
 | 
			
		||||
  };
 | 
			
		||||
 | 
			
		||||
  handleClick = (e) => {
 | 
			
		||||
    if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {
 | 
			
		||||
    if (this.context.router && e.button === 0 && !(e.ctrlKey || e.metaKey)) {
 | 
			
		||||
      e.preventDefault();
 | 
			
		||||
      this.context.router.history.push(this.props.to);
 | 
			
		||||
    }
 | 
			
		||||
@@ -25,7 +25,7 @@ export default class Permalink extends React.PureComponent {
 | 
			
		||||
    const { href, children, className, ...other } = this.props;
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
      <a href={href} onClick={this.handleClick} {...other} className={`permalink${className ? ' ' + className : ''}`}>
 | 
			
		||||
      <a target='_blank' href={href} onClick={this.handleClick} {...other} className={`permalink${className ? ' ' + className : ''}`}>
 | 
			
		||||
        {children}
 | 
			
		||||
      </a>
 | 
			
		||||
    );
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user