Files
twenty/packages/twenty-front/src/modules/page-layout/states/widgetInsertionContextComponentState.ts
T

16 lines
562 B
TypeScript

import { createAtomComponentState } from '@/ui/utilities/state/jotai/utils/createAtomComponentState';
import { PageLayoutComponentInstanceContext } from './contexts/PageLayoutComponentInstanceContext';
export type WidgetInsertionContext = {
targetWidgetId: string;
direction: 'above' | 'below';
} | null;
export const widgetInsertionContextComponentState =
createAtomComponentState<WidgetInsertionContext>({
key: 'widgetInsertionContextComponentState',
defaultValue: null,
componentInstanceContext: PageLayoutComponentInstanceContext,
});