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

added node edit menu

This commit is contained in:
Fedor Katurov 2022-07-15 12:13:27 +07:00
parent f185914c7c
commit 74f4c7562b
16 changed files with 320 additions and 175 deletions

View file

@ -0,0 +1,23 @@
import React, { FC } from 'react';
import { Icon } from '~/components/input/Icon';
import styles from './styles.module.scss';
interface MenuItemWithIconProps {
children: 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>
<div className={styles.text}>{children}</div>
</button>
);
export { MenuItemWithIcon };

View file

@ -0,0 +1,29 @@
@import "src/styles/variables";
.item {
@include row_shadow;
@include hover_opacity;
font: $font_14_medium;
line-height: 20px;
padding: $gap + 2px $gap $gap - 2px;
display: flex;
flex-direction: row;
color: white;
align-items: stretch;
justify-content: center;
width: 100%;
cursor: pointer;
}
.icon {
flex: 0 0 20px;
margin-right: $gap;
}
.text {
flex: 1;
text-align: left;
padding-right: $gap;
white-space: nowrap;
}