mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-21 15:02:27 -05:00
32aafbcf9d
* 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>
21 lines
592 B
TypeScript
21 lines
592 B
TypeScript
import { PenpotFile } from '@ui/lib/types/penpotFile';
|
|
import { BoolShape } from '@ui/lib/types/shapes/boolShape';
|
|
import { symbolBlendMode, symbolBoolType, symbolFillGradients } from '@ui/parser/creators/symbols';
|
|
|
|
import { createItems } from '.';
|
|
|
|
export const createBool = (
|
|
file: PenpotFile,
|
|
{ type, fills, boolType, blendMode, children = [], ...rest }: BoolShape
|
|
) => {
|
|
file.addBool({
|
|
fills: symbolFillGradients(fills),
|
|
blendMode: symbolBlendMode(blendMode),
|
|
boolType: symbolBoolType(boolType),
|
|
...rest
|
|
});
|
|
|
|
createItems(file, children);
|
|
|
|
file.closeBool();
|
|
};
|