mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 12:56:41 +07:00
#23 added labs layout
This commit is contained in:
parent
8316b46efe
commit
18ec220a4e
14 changed files with 135 additions and 65 deletions
34
src/containers/lab/LabNode/index.tsx
Normal file
34
src/containers/lab/LabNode/index.tsx
Normal file
|
@ -0,0 +1,34 @@
|
|||
import React, { FC } from 'react';
|
||||
import { INode } from '~/redux/types';
|
||||
import { NodePanelInner } from '~/components/node/NodePanelInner';
|
||||
import { useNodeBlocks } from '~/utils/hooks/node/useNodeBlocks';
|
||||
|
||||
interface IProps {
|
||||
node: INode;
|
||||
}
|
||||
|
||||
const LabNode: FC<IProps> = ({ node }) => {
|
||||
const { inline, block, head } = useNodeBlocks(node, false);
|
||||
|
||||
return (
|
||||
<div>
|
||||
<NodePanelInner
|
||||
node={node}
|
||||
canEdit
|
||||
canLike
|
||||
canStar
|
||||
isLoading={false}
|
||||
onEdit={console.log}
|
||||
onLike={console.log}
|
||||
onStar={console.log}
|
||||
onLock={console.log}
|
||||
/>
|
||||
|
||||
{inline}
|
||||
{block}
|
||||
{head}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export { LabNode };
|
Loading…
Add table
Add a link
Reference in a new issue