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

NodeLayout

This commit is contained in:
muerwre 2019-08-25 16:10:46 +07:00
parent 684a4f4474
commit b154277de8
23 changed files with 332 additions and 65 deletions

View file

@ -3,17 +3,20 @@ import { Cell } from '~/components/flow/Cell';
import * as styles from './styles.scss';
import { IFlowState } from '~/redux/flow/reducer';
import { INode } from '~/redux/types';
type IProps = Partial<IFlowState> & {};
type IProps = Partial<IFlowState> & {
onSelect: (id: INode['id']) => void;
};
export const FlowGrid: FC<IProps> = ({ nodes }) => (
export const FlowGrid: FC<IProps> = ({ nodes, onSelect }) => (
<div>
<div className={styles.grid_test}>
<div className={styles.hero}>HERO</div>
<div className={styles.stamp}>STAMP</div>
{nodes.map(node => (
<Cell key={node.id} node={node} />
<Cell key={node.id} node={node} onSelect={onSelect} />
))}
</div>
</div>