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:
parent
6fc812a08f
commit
d92b200a04
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||
};
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue