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

13 lines
348 B
TypeScript
Raw Normal View History

2024-04-15 11:18:58 -05:00
import { translateBlendMode } from '@plugin/translators';
2024-05-06 01:06:14 -05:00
import { ShapeAttributes } from '@ui/lib/types/shapes/shape';
2024-04-15 11:18:58 -05:00
export const transformBlend = (
node: SceneNodeMixin & MinimalBlendMixin
): Pick<ShapeAttributes, 'blendMode' | 'opacity'> => {
2024-04-15 11:18:58 -05:00
return {
blendMode: translateBlendMode(node.blendMode),
opacity: node.opacity
2024-04-15 11:18:58 -05:00
};
};