mirror of
https://github.com/ascribe/onion.git
synced 2024-06-30 21:52:08 +02:00
24 lines
519 B
JavaScript
24 lines
519 B
JavaScript
|
import React from 'react';
|
||
|
|
||
|
let TableHeaderItemCarret = React.createClass({
|
||
|
propTypes: {
|
||
|
orderAsc: React.PropTypes.bool.isRequired
|
||
|
},
|
||
|
|
||
|
render() {
|
||
|
let carretDirection = 'glyphicon-triangle-';
|
||
|
|
||
|
if(this.props.orderAsc) {
|
||
|
carretDirection += 'top';
|
||
|
} else {
|
||
|
carretDirection += 'bottom';
|
||
|
}
|
||
|
|
||
|
return (
|
||
|
<span className={'glyphicon ' + carretDirection}>
|
||
|
</span>
|
||
|
);
|
||
|
}
|
||
|
});
|
||
|
|
||
|
export default TableHeaderItemCarret;
|