mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-05-01 15:46:40 +07:00
#23 using custom blocks at lab nodes
This commit is contained in:
parent
bee41ebfb3
commit
031de64acc
17 changed files with 330 additions and 43 deletions
|
@ -4,28 +4,17 @@ import { NodePanelInner } from '~/components/node/NodePanelInner';
|
|||
import { useNodeBlocks } from '~/utils/hooks/node/useNodeBlocks';
|
||||
import styles from './styles.module.scss';
|
||||
import { Card } from '~/components/containers/Card';
|
||||
import { NodePanelLab } from '~/components/node/NodePanelLab';
|
||||
import { LabNodeTitle } from '~/components/lab/LabNodeTitle';
|
||||
import { Grid } from '~/components/containers/Grid';
|
||||
|
||||
interface IProps {
|
||||
node: INode;
|
||||
}
|
||||
|
||||
const LabNode: FC<IProps> = ({ node }) => {
|
||||
const { inline, block, head } = useNodeBlocks(node, false);
|
||||
const { lab } = useNodeBlocks(node, false);
|
||||
|
||||
console.log(node.id, { inline, block, head });
|
||||
|
||||
return (
|
||||
<Card seamless className={styles.wrap}>
|
||||
<div className={styles.head}>
|
||||
<NodePanelLab node={node} />
|
||||
</div>
|
||||
|
||||
{head}
|
||||
{block}
|
||||
{inline}
|
||||
</Card>
|
||||
);
|
||||
return <div className={styles.wrap}>{lab}</div>;
|
||||
};
|
||||
|
||||
export { LabNode };
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
@import "~/styles/variables.scss";
|
||||
|
||||
.wrap {
|
||||
box-shadow: transparentize(black, 0.5) 0 0 0 1px, inset transparentize(white, 0.9) 0 1px, lighten(black, 10%) 0 4px;
|
||||
background-color: $content_bg;
|
||||
cursor: pointer;
|
||||
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.head {
|
||||
background-color: transparentize(black, 0.9);
|
||||
border-radius: $radius $radius 0 0;
|
||||
border-radius: $radius;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue