mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
19 lines
437 B
TypeScript
19 lines
437 B
TypeScript
import {
|
|
handleCancelMessage,
|
|
handleExportMessage,
|
|
handleResizeMessage
|
|
} from '@plugin/messageHandlers';
|
|
|
|
figma.showUI(__html__, { themeColors: true, height: 200, width: 300 });
|
|
|
|
figma.ui.onmessage = async msg => {
|
|
if (msg.type === 'export') {
|
|
await handleExportMessage();
|
|
}
|
|
if (msg.type === 'cancel') {
|
|
handleCancelMessage();
|
|
}
|
|
if (msg.type === 'resize') {
|
|
handleResizeMessage(msg.width, msg.height);
|
|
}
|
|
};
|