0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00

fix group and text

This commit is contained in:
Jordi Sala Morales 2024-04-16 09:24:53 +00:00
parent 5e13a45cf4
commit aec1c38e15
No known key found for this signature in database
GPG key ID: C5127140107F55FD
2 changed files with 6 additions and 2 deletions

View file

@ -1,15 +1,17 @@
import { PenpotFile } from '@ui/lib/penpot';
import { GROUP_TYPE } from '@ui/lib/types/group/groupAttributes';
import { GroupShape } from '@ui/lib/types/group/groupShape';
import { translateUiBlendMode } from '@ui/translators';
import { createPenpotItem } from '.';
export const createPenpotGroup = (
file: PenpotFile,
{ type, children = [], ...rest }: GroupShape
{ type, blendMode, children = [], ...rest }: GroupShape
) => {
file.addGroup({
type: GROUP_TYPE,
blendMode: translateUiBlendMode(blendMode),
...rest
});

View file

@ -1,10 +1,12 @@
import { PenpotFile } from '@ui/lib/penpot';
import { TEXT_TYPE } from '@ui/lib/types/text/textAttributes';
import { TextShape } from '@ui/lib/types/text/textShape';
import { translateUiBlendMode } from '@ui/translators';
export const createPenpotText = (file: PenpotFile, { type, ...rest }: TextShape) => {
export const createPenpotText = (file: PenpotFile, { type, blendMode, ...rest }: TextShape) => {
file.createText({
type: TEXT_TYPE,
blendMode: translateUiBlendMode(blendMode),
...rest
});
};