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

fixed lab header colors

This commit is contained in:
Fedor Katurov 2022-03-24 19:12:43 +07:00
parent 26a061026f
commit 61326f237f
8 changed files with 63 additions and 18 deletions

View file

@ -10,12 +10,13 @@ import styles from './styles.module.scss';
interface IProps {
icon: string;
color: 'green' | 'orange' | 'yellow';
isLoading?: boolean;
active?: boolean;
onClick?: () => void;
}
const LabHeadItem: FC<IProps> = ({ icon, children, isLoading, active, onClick }) => {
const LabHeadItem: FC<IProps> = ({ icon, color, children, isLoading, active, onClick }) => {
if (isLoading) {
return (
<Group horizontal className={styles.item} key="loading">
@ -26,14 +27,13 @@ const LabHeadItem: FC<IProps> = ({ icon, children, isLoading, active, onClick })
}
return (
<Group
horizontal
className={classNames(styles.item, { [styles.active]: active })}
<div
className={classNames(styles.item, { [styles.active]: active }, styles[color])}
onClick={onClick}
>
<Icon icon={icon} size={24} />
<span className={styles.text}>{children}</span>
</Group>
</div>
);
};