generated from CodelyTV/figma-plugin-skeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CommandsMapping.ts
16 lines (15 loc) · 1.16 KB
/
CommandsMapping.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { NetworkRequestCommandHandler } from "../browser-commands/network-request/NetworkRequestCommandHandler";
import { CancelCommandHandler } from "../scene-commands/cancel/CancelCommandHandler";
import { CreateShapesCommandHandler } from "../scene-commands/create-shapes/CreateShapesCommandHandler";
import { PaintCurrentUserAvatarCommandHandler } from "../scene-commands/paint-current-user-avatar/PaintCurrentUserAvatarCommandHandler";
import { Command } from "./Command";
import { CommandHandler } from "./CommandHandler";
// 👋 Add below your new commands.
// Define its arbitrary key and its corresponding Handler class.
// Tip: Declare your Command and CommandHandler classes creating a folder inside the `src/scene-commands` or `src/browser-commands` ones depending on the things you need to get access to (see the README explanation) 😊
export const CommandsMapping: Record<string, () => CommandHandler<Command>> = {
cancel: () => new CancelCommandHandler(figma),
createShapes: () => new CreateShapesCommandHandler(figma),
paintCurrentUserAvatar: () => new PaintCurrentUserAvatarCommandHandler(figma),
networkRequest: () => new NetworkRequestCommandHandler(),
};