feat: dashboard style.

This commit is contained in:
Ahmed Bouhuolia
2020-04-12 12:03:45 +02:00
parent 6dcff7e4c2
commit 37fb5a6f11
24 changed files with 517 additions and 201 deletions

View File

@@ -16,14 +16,7 @@ import Icon from 'components/Icon';
const IndeterminateCheckbox = React.forwardRef(
({ indeterminate, ...rest }, ref) => {
const defaultRef = React.useRef()
const resolvedRef = ref || defaultRef
useEffect(() => {
resolvedRef.current.indeterminate = indeterminate
}, [resolvedRef, indeterminate])
return (<Checkbox ref={resolvedRef} {...rest} />);
return (<Checkbox indeterminate={indeterminate} {...rest} />);
}
);
@@ -174,13 +167,14 @@ export default function DataTable({
})}>
<div {...column.getSortByToggleProps()}>
{column.render('Header')}
<span>
{column.isSorted
? column.isSortedDesc
? (<Icon icon="sort-down" />)
: (<Icon icon="sort-up" />)
: ''}
</span>
{column.isSorted && (
<span className={classnames({
'sort-icon--desc': column.isSortedDesc,
'sort-icon--asc': !column.isSortedDesc,
}, 'sort-icon')}>
</span>
)}
</div>
{column.canResize && (