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/plugin-src/transformers/partials/transformBlend.ts
Jordi Sala Morales b8058dc0ee
refactor blend
2024-04-15 16:18:58 +00:00

12 lines
440 B
TypeScript

import { translateBlendMode } from '@plugin/translators';
import { ShapeAttributes } from '@ui/lib/types/shape/shapeAttributes';
export const transformBlend = (
node: SceneNodeMixin & MinimalBlendMixin
): Partial<ShapeAttributes> => {
return {
blendMode: translateBlendMode(node.blendMode),
opacity: !node.visible ? 0 : node.opacity // @TODO: check this. If we use the property hidden and it's hidden, it won't export
};
};