Skip to content

Commit

Permalink
feat: add copy context field for prepared copy item type (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
flops authored Mar 27, 2024
1 parent d2d4c27 commit 6ff6436
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/components/OverlayControls/OverlayControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ import noop from 'lodash/noop';

import {DashKitContext} from '../../context/DashKitContext';
import {
Icon,
DropdownMenu,
Button,
ButtonView,
ButtonSize,
ButtonView,
DropdownMenu,
Icon,
IconProps,
MenuItemProps,
} from '@gravity-ui/uikit';
import {COPIED_WIDGET_STORE_KEY, OVERLAY_CONTROLS_CLASS_NAME, MenuItems} from '../../constants';
import {ConfigLayout, ConfigItem, PluginBase, StringParams, Config, ItemState} from '../../shared';
import {COPIED_WIDGET_STORE_KEY, MenuItems, OVERLAY_CONTROLS_CLASS_NAME} from '../../constants';
import {Config, ConfigItem, ConfigLayout, ItemState, PluginBase, StringParams} from '../../shared';
import type {RegisterManager} from '../../utils/register-manager';
import {DotsIcon} from '../../icons/DotsIcon';
import {CogIcon} from '../../icons/CogIcon';
Expand Down Expand Up @@ -74,7 +74,9 @@ type PreparedCopyItemOptionsArg = Pick<ConfigItem, 'data' | 'type' | 'defaults'
};
};

export type PreparedCopyItemOptions = PreparedCopyItemOptionsArg;
export type PreparedCopyItemOptions<C extends object = {}> = PreparedCopyItemOptionsArg & {
copyContext?: C;
};

type DashKitCtx = React.Context<{
context: Record<string, any>;
Expand Down

0 comments on commit 6ff6436

Please sign in to comment.