mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
881ccabe86
* fixes in text nodes * fix comment * allow design.penpot.app * wip * wip * add position data * wip agaaain * added translate growtype * use a random url just to get a 404 on gfonts call * leave the config, just in case someone wants to try it * translated line height & letter spacing; Created new type for text positionData * text strokes * several fixes * compiled penpot lib with fix * updated penpot lib * fix lint * remove proxy * correctly translate font style * fix grow type to reflect vertical trim * Fix font segments * remove comment * changeset --------- Co-authored-by: Alex Sánchez <sion333@gmail.com>
16 lines
380 B
TypeScript
16 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';
|
|
}
|
|
};
|