Skip to content

Commit e4ec0b1

Browse files
committed
✨ 모든 모드에서 사용되는 노드렌더러 래퍼 컴포넌트 구현
두가지 모드에서 사용되는 노드 렌더러 래퍼컴포넌트 구현완료. 노드 렌더러는 항상 래퍼 컴포넌트를 100%채우도록 렌더링 되기 때문에 노드의 레이아웃은 현재 래퍼 컴포넌트가 담당한다.
1 parent c7303ac commit e4ec0b1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { BaseNode } from "types";
2+
3+
interface Props {
4+
children: React.ReactNode;
5+
node: BaseNode;
6+
}
7+
8+
export default function BaseLayoutNodeWrapper({ children, node }: Props) {
9+
const { x: top, y: left, width, height, zIndex } = node.layout;
10+
return (
11+
<div style={{ position: "absolute", top, left, width, height, zIndex }}>
12+
{children}
13+
</div>
14+
);
15+
}

0 commit comments

Comments
 (0)