mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
13 lines
425 B
TypeScript
13 lines
425 B
TypeScript
|
import { translateConstraintH, translateConstraintV } from '@plugin/translators';
|
||
|
|
||
|
import { ShapeAttributes } from '@ui/lib/types/shapes/shape';
|
||
|
|
||
|
export const transformConstraints = (
|
||
|
node: ConstraintMixin
|
||
|
): Pick<ShapeAttributes, 'constraintsH' | 'constraintsV'> => {
|
||
|
return {
|
||
|
constraintsH: translateConstraintH(node.constraints.horizontal),
|
||
|
constraintsV: translateConstraintV(node.constraints.vertical)
|
||
|
};
|
||
|
};
|