0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 21:53:27 -05:00
penpot-exporter-figma-plugin/ui-src/parser/creators/createPage.ts
Jordi Sala Morales 32aafbcf9d
Implement components (#106)
* Implement components

* fix

* revert

* wip

* wip

* wip

* 🎉 Finish create component operation

* minor fixes

* not needed, refactor

* refactor not needed

* refactor not needed

* remove deps

* add changelog

* fixes

* fixes

* fixes

* fix lint

* refactor ui-src

* further refactor

* refactor

* refactor

* more refactor

* refactor

* refactor

* penpot lib update

---------

Co-authored-by: Alex Sánchez <sion333@gmail.com>
Co-authored-by: Andrés Moya <andres.moya@kaleidos.net>
2024-05-29 12:52:21 +02:00

12 lines
328 B
TypeScript

import { PenpotFile } from '@ui/lib/types/penpotFile';
import { PenpotPage } from '@ui/lib/types/penpotPage';
import { createItems } from '.';
export const createPage = (file: PenpotFile, { name, options, children = [] }: PenpotPage) => {
file.addPage(name, options);
createItems(file, children);
file.closePage();
};