1
0
Fork 0
mirror of https://github.com/muerwre/vault-frontend.git synced 2025-04-25 04:46:40 +07:00

added lab sorting

This commit is contained in:
Fedor Katurov 2022-03-23 17:54:51 +07:00
parent 566e1192cd
commit 948f3a7e04
7 changed files with 63 additions and 15 deletions

View file

@ -12,12 +12,13 @@ interface IProps {
icon: string;
isLoading?: boolean;
active?: boolean;
onClick?: () => void;
}
const LabHeadItem: FC<IProps> = ({ icon, children, isLoading, active }) => {
const LabHeadItem: FC<IProps> = ({ icon, children, isLoading, active, onClick }) => {
if (isLoading) {
return (
<Group horizontal className={styles.item}>
<Group horizontal className={styles.item} key="loading">
<Placeholder width="32px" height={32} />
<Placeholder width="96px" height={18} />
</Group>
@ -25,7 +26,11 @@ const LabHeadItem: FC<IProps> = ({ icon, children, isLoading, active }) => {
}
return (
<Group horizontal className={classNames(styles.item, { [styles.active]: active })}>
<Group
horizontal
className={classNames(styles.item, { [styles.active]: active })}
onClick={onClick}
>
<Icon icon={icon} size={24} />
<span className={styles.text}>{children}</span>
</Group>