0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-23 06:04:01 -05:00
penpot-exporter-figma-plugin/plugin-src/transformers/partials/transformBlend.ts
Jordi Sala Morales 559a758d21
Respect nodes visibility and opacity (#152)
* Respect nodes visibility and opacity

* add changelog

* fixes

---------

Co-authored-by: Alex Sánchez <sion333@gmail.com>
2024-06-11 09:57:11 +02:00

12 lines
348 B
TypeScript

import { translateBlendMode } from '@plugin/translators';
import { ShapeAttributes } from '@ui/lib/types/shapes/shape';
export const transformBlend = (
node: SceneNodeMixin & MinimalBlendMixin
): Pick<ShapeAttributes, 'blendMode' | 'opacity'> => {
return {
blendMode: translateBlendMode(node.blendMode),
opacity: node.opacity
};
};