2
0
Files
bot/apps/builder/components/board/Board.tsx

28 lines
795 B
TypeScript
Raw Normal View History

2021-12-16 10:43:49 +01:00
import { Flex } from '@chakra-ui/react'
import React from 'react'
import Graph from './graph/Graph'
import { DndContext } from 'contexts/DndContext'
import { headerHeight } from 'components/shared/TypebotHeader/TypebotHeader'
import { StepTypesList } from './StepTypesList'
import { PreviewDrawer } from './preview/PreviewDrawer'
import { RightPanel, useEditor } from 'contexts/EditorContext'
2021-12-16 10:43:49 +01:00
export const Board = () => {
const { rightPanel } = useEditor()
return (
<Flex
flex="1"
pos="relative"
bgColor="gray.50"
h={`calc(100vh - ${headerHeight}px)`}
marginTop={`${headerHeight}px`}
>
<DndContext>
<StepTypesList />
<Graph />
{rightPanel === RightPanel.PREVIEW && <PreviewDrawer />}
</DndContext>
</Flex>
)
}