import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import Icon from '../Icon'; const baseLabelClassName = 'flex flex-col flex-1 text-white text-lg pl-1 select-none'; const spanClassName = 'flex flex-row items-center cursor-pointer focus:outline-none'; const sortIconMap = { descending: 'sorting-active-up', ascending: 'sorting-active-down', none: 'sorting', }; const InputLabelWrapper = ({ label, isSortable, sortDirection, onLabelClick, className, children, }) => { const onClickHandler = e => { if (!isSortable) { return; } onLabelClick(e); }; return ( ); }; InputLabelWrapper.defaultProps = { className: '', }; InputLabelWrapper.propTypes = { label: PropTypes.string.isRequired, isSortable: PropTypes.bool.isRequired, sortDirection: PropTypes.oneOf(['ascending', 'descending', 'none']).isRequired, onLabelClick: PropTypes.func.isRequired, className: PropTypes.string, children: PropTypes.node, }; export default InputLabelWrapper;