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:
parent
0564fe29e2
commit
efe7800743
9 changed files with 42 additions and 84 deletions
|
@ -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>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue