0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2025-01-03 05:10:13 -05:00

Send ry on corner-radius (#157)

This commit is contained in:
Jordi Sala Morales 2024-06-13 10:06:56 +02:00 committed by GitHub
parent 6fc812a08f
commit d92b200a04
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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,
@ -20,7 +23,8 @@ export const transformCornerRadius = (
if (node.cornerRadius !== figma.mixed) {
return {
rx: node.cornerRadius
rx: node.cornerRadius,
ry: node.cornerRadius
};
}
};