mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
fix group and text
This commit is contained in:
parent
5e13a45cf4
commit
aec1c38e15
2 changed files with 6 additions and 2 deletions
|
@ -1,15 +1,17 @@
|
||||||
import { PenpotFile } from '@ui/lib/penpot';
|
import { PenpotFile } from '@ui/lib/penpot';
|
||||||
import { GROUP_TYPE } from '@ui/lib/types/group/groupAttributes';
|
import { GROUP_TYPE } from '@ui/lib/types/group/groupAttributes';
|
||||||
import { GroupShape } from '@ui/lib/types/group/groupShape';
|
import { GroupShape } from '@ui/lib/types/group/groupShape';
|
||||||
|
import { translateUiBlendMode } from '@ui/translators';
|
||||||
|
|
||||||
import { createPenpotItem } from '.';
|
import { createPenpotItem } from '.';
|
||||||
|
|
||||||
export const createPenpotGroup = (
|
export const createPenpotGroup = (
|
||||||
file: PenpotFile,
|
file: PenpotFile,
|
||||||
{ type, children = [], ...rest }: GroupShape
|
{ type, blendMode, children = [], ...rest }: GroupShape
|
||||||
) => {
|
) => {
|
||||||
file.addGroup({
|
file.addGroup({
|
||||||
type: GROUP_TYPE,
|
type: GROUP_TYPE,
|
||||||
|
blendMode: translateUiBlendMode(blendMode),
|
||||||
...rest
|
...rest
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
import { PenpotFile } from '@ui/lib/penpot';
|
import { PenpotFile } from '@ui/lib/penpot';
|
||||||
import { TEXT_TYPE } from '@ui/lib/types/text/textAttributes';
|
import { TEXT_TYPE } from '@ui/lib/types/text/textAttributes';
|
||||||
import { TextShape } from '@ui/lib/types/text/textShape';
|
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({
|
file.createText({
|
||||||
type: TEXT_TYPE,
|
type: TEXT_TYPE,
|
||||||
|
blendMode: translateUiBlendMode(blendMode),
|
||||||
...rest
|
...rest
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue