mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
1f8f4bf539
* Add more loaders so we can track the progress better * fix lint
20 lines
480 B
TypeScript
20 lines
480 B
TypeScript
// @TODO: Direct import on purpose, to avoid problems with the tsc linting
|
|
import { sleep } from '@plugin/utils/sleep';
|
|
|
|
import { PenpotFile } from '@ui/lib/types/penpotFile';
|
|
import { PenpotPage } from '@ui/lib/types/penpotPage';
|
|
|
|
import { createItems } from '.';
|
|
|
|
export const createPage = async (
|
|
file: PenpotFile,
|
|
{ name, options, children = [] }: PenpotPage
|
|
) => {
|
|
file.addPage(name, options);
|
|
|
|
createItems(file, children);
|
|
|
|
await sleep(0);
|
|
|
|
file.closePage();
|
|
};
|