/**
 * @file TableHeaderSortIcon component
 * @author liangxiaojun(liangxiaojun@derbysoft.com)
 */

import React, {Component} from 'react';
import PropTypes from 'prop-types';
import classNames from 'classnames';

class TableHeaderSortIcon extends Component {

    constructor(props, ...restArgs) {
        super(props, ...restArgs);
    }

    render() {

        const {sort, sortProp, sortAscIconCls, sortDescIconCls} = this.props,

            className = classNames('table-header-sort-icon-wrapper',
                sort && sort.prop === sortProp ? (sort.type > 0 ? ' asc' : ' desc') : '');

        return (
            <div className={className}>
                <i className={`table-header-sort-icon ${sortAscIconCls} up`}
                   aria-hidden="true"></i>
                <i className={`table-header-sort-icon ${sortDescIconCls} down`}
                   aria-hidden="true"></i>
            </div>
        );

    }
};

TableHeaderSortIcon.propTypes = {
    sort: PropTypes.object,
    sortProp: PropTypes.string,
    sortAscIconCls: PropTypes.string,
    sortDescIconCls: PropTypes.string
};

TableHeaderSortIcon.defaultProps = {
    sort: null,
    sortProp: null,
    sortAscIconCls: 'fas fa-angle-up',
    sortDescIconCls: 'fas fa-angle-down'
};

export default TableHeaderSortIcon;
@@ -207,16 +207,78 @@
 ames';%0A%0A
+import PureRender from '../_vendors/PureRender';%0A%0A@PureRender%0A
 class Ta
@@ -989,24 +989,66 @@
 %0A%0A    %7D%0A%7D;%0A%0A
+process.env.NODE_ENV !== 'production' && (
 TableHeaderS
@@ -1206,16 +1206,17 @@
 string%0A%7D
+)
 ;%0A%0ATable
@@ -1251,44 +1251,8 @@
 = %7B%0A
-    sort: null,%0A    sortProp: null,%0A
     

update TableHeaderSortIcon