22 lines
683 B
TypeScript
22 lines
683 B
TypeScript
import { type FC, useState } from 'react'
|
|
import { clx } from '@/helpers/utils'
|
|
import EditorSidebar from './components/EditorSidebar'
|
|
import EditorCanvas from './components/EditorCanvas'
|
|
import LayersPanel from './components/LayersPanel'
|
|
|
|
const Editor: FC = () => {
|
|
const [isLayersPanelOpen, setIsLayersPanelOpen] = useState(false)
|
|
|
|
return (
|
|
<div className={clx(
|
|
"flex h-full w-full",
|
|
isLayersPanelOpen ? "xl:pl-[296px]" : "xl:pl-[80px]"
|
|
)}>
|
|
<LayersPanel isOpen={isLayersPanelOpen} setIsOpen={setIsLayersPanelOpen} />
|
|
<EditorCanvas />
|
|
<EditorSidebar />
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default Editor |