UNPKG

@orfeas126/box-ui-elements

Version:
26 lines (25 loc) 723 B
/** * * @file Function to render the date table cell * @author Box */ import * as React from 'react'; import IconChevron from '../../icons/general/IconChevron'; import { SORT_ASC, COLOR_999 } from '../../constants'; import './headerCellRenderer.scss'; export default (({ dataKey, label, sortBy, sortDirection }) => { const by = sortBy && sortBy.toLowerCase(); const direction = sortDirection === SORT_ASC ? 'up' : 'down'; return /*#__PURE__*/React.createElement("div", null, label, "\xA0\xA0", by === dataKey && /*#__PURE__*/React.createElement(IconChevron, { color: COLOR_999, direction: direction, size: "6px", thickness: "1px" })); }); //# sourceMappingURL=headerCellRenderer.js.map