Workspaces FE (#1733)
This commit is contained in:
committed by
GitHub
parent
fe2215ba85
commit
527febdc52
25
frontend/src/components/ui-new/scope/NewDesignScope.tsx
Normal file
25
frontend/src/components/ui-new/scope/NewDesignScope.tsx
Normal file
@@ -0,0 +1,25 @@
|
||||
import { ReactNode, useRef } from 'react';
|
||||
import { PortalContainerContext } from '@/contexts/PortalContainerContext';
|
||||
import { WorkspaceProvider } from '@/contexts/WorkspaceContext';
|
||||
import { ActionsProvider } from '@/contexts/ActionsContext';
|
||||
import NiceModal from '@ebay/nice-modal-react';
|
||||
import '@/styles/new/index.css';
|
||||
|
||||
interface NewDesignScopeProps {
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
export function NewDesignScope({ children }: NewDesignScopeProps) {
|
||||
const ref = useRef<HTMLDivElement>(null);
|
||||
return (
|
||||
<div ref={ref} className="new-design h-full">
|
||||
<PortalContainerContext.Provider value={ref}>
|
||||
<WorkspaceProvider>
|
||||
<ActionsProvider>
|
||||
<NiceModal.Provider>{children}</NiceModal.Provider>
|
||||
</ActionsProvider>
|
||||
</WorkspaceProvider>
|
||||
</PortalContainerContext.Provider>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user