mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2025-01-10 00:50:16 -05:00
17 lines
380 B
TypeScript
17 lines
380 B
TypeScript
|
import { TextHorizontalAlign } from '@ui/lib/types/text/textContent';
|
||
|
|
||
|
export const translateHorizontalAlign = (
|
||
|
align: 'LEFT' | 'CENTER' | 'RIGHT' | 'JUSTIFIED'
|
||
|
): TextHorizontalAlign => {
|
||
|
switch (align) {
|
||
|
case 'RIGHT':
|
||
|
return 'right';
|
||
|
case 'CENTER':
|
||
|
return 'center';
|
||
|
case 'JUSTIFIED':
|
||
|
return 'justify';
|
||
|
default:
|
||
|
return 'left';
|
||
|
}
|
||
|
};
|