Skip to content

Commit

Permalink
Send ry on corner-radius (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordisala1991 authored Jun 13, 2024
1 parent 6fc812a commit d92b200
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions plugin-src/transformers/partials/transformCornerRadius.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ const isRectangleCornerMixin = (

export const transformCornerRadius = (
node: CornerMixin | (CornerMixin & RectangleCornerMixin)
): Pick<ShapeAttributes, 'r1' | 'r2' | 'r3' | 'r4'> | Pick<ShapeAttributes, 'rx'> | undefined => {
):
| Pick<ShapeAttributes, 'r1' | 'r2' | 'r3' | 'r4'>
| Pick<ShapeAttributes, 'rx' | 'ry'>
| undefined => {
if (isRectangleCornerMixin(node)) {
return {
r1: node.topLeftRadius,
Expand All @@ -20,7 +23,8 @@ export const transformCornerRadius = (

if (node.cornerRadius !== figma.mixed) {
return {
rx: node.cornerRadius
rx: node.cornerRadius,
ry: node.cornerRadius
};
}
};

0 comments on commit d92b200

Please sign in to comment.