mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-04 22:01:08 -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 = (
|
export const transformCornerRadius = (
|
||||||
node: CornerMixin | (CornerMixin & RectangleCornerMixin)
|
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)) {
|
if (isRectangleCornerMixin(node)) {
|
||||||
return {
|
return {
|
||||||
r1: node.topLeftRadius,
|
r1: node.topLeftRadius,
|
||||||
|
@ -20,7 +23,8 @@ export const transformCornerRadius = (
|
||||||
|
|
||||||
if (node.cornerRadius !== figma.mixed) {
|
if (node.cornerRadius !== figma.mixed) {
|
||||||
return {
|
return {
|
||||||
rx: node.cornerRadius
|
rx: node.cornerRadius,
|
||||||
|
ry: node.cornerRadius
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue