mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 17:45:10 +01:00
26 lines
534 B
JavaScript
26 lines
534 B
JavaScript
'use strict';
|
|
|
|
import React from 'react';
|
|
|
|
let TableHeaderItemCarret = React.createClass({
|
|
propTypes: {
|
|
orderAsc: React.PropTypes.bool.isRequired
|
|
},
|
|
|
|
render() {
|
|
let carretDirection = 'glyphicon-triangle-';
|
|
|
|
if(this.props.orderAsc) {
|
|
carretDirection += 'bottom';
|
|
} else {
|
|
carretDirection += 'top';
|
|
}
|
|
|
|
return (
|
|
<span className={'glyphicon ' + carretDirection}>
|
|
</span>
|
|
);
|
|
}
|
|
});
|
|
|
|
export default TableHeaderItemCarret; |