1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-16 01:55:07 +01:00
onion/js/components/ascribe_table/table_header_item_carret.js

24 lines
519 B
JavaScript
Raw Normal View History

2015-05-21 14:51:15 +02:00
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';
2015-05-21 16:06:16 +02:00
} else {
carretDirection += 'top';
2015-05-21 14:51:15 +02:00
}
return (
<span className={'glyphicon ' + carretDirection}>
</span>
);
}
});
export default TableHeaderItemCarret;