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

made better profile menu

This commit is contained in:
Fedor Katurov 2022-07-20 15:54:22 +07:00
parent 0564fe29e2
commit efe7800743
9 changed files with 42 additions and 84 deletions

View file

@ -6,15 +6,17 @@ import styles from './styles.module.scss';
interface MenuItemWithIconProps {
children: string;
icon: string;
icon?: string;
onClick?: () => void;
}
const MenuItemWithIcon: FC<MenuItemWithIconProps> = ({ children, icon, onClick }) => (
<button className={styles.item} onClick={onClick}>
<div className={styles.icon}>
<Icon icon={icon} size={20} />
</div>
{icon && (
<div className={styles.icon}>
<Icon icon={icon} size={20} />
</div>
)}
<div className={styles.text}>{children}</div>
</button>

View file

@ -18,12 +18,11 @@
.icon {
flex: 0 0 20px;
margin-right: $gap;
}
.text {
flex: 1;
text-align: left;
padding-right: $gap;
padding: 0 $gap;
white-space: nowrap;
}