mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
added sample settings page
This commit is contained in:
parent
7a6a44cccf
commit
100c4c138a
29 changed files with 527 additions and 113 deletions
|
@ -1,40 +0,0 @@
|
|||
import React, { FC } from 'react';
|
||||
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { Group } from '~/components/containers/Group';
|
||||
import { Icon } from '~/components/input/Icon';
|
||||
import { Placeholder } from '~/components/placeholders/Placeholder';
|
||||
|
||||
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, color, children, isLoading, active, onClick }) => {
|
||||
if (isLoading) {
|
||||
return (
|
||||
<div className={styles.item} key="loading">
|
||||
<Placeholder width="32px" height={32} />
|
||||
<Placeholder width="96px" height={18} />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className={classNames(styles.item, { [styles.active]: active }, styles[color])}
|
||||
onClick={onClick}
|
||||
>
|
||||
<Icon icon={icon} size={24} />
|
||||
<span className={styles.text}>{children}</span>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export { LabHeadItem };
|
Loading…
Add table
Add a link
Reference in a new issue