0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 21:53:27 -05:00
penpot-exporter-figma-plugin/plugin-src/translators/translateBlurEffects.ts

16 lines
331 B
TypeScript
Raw Permalink Normal View History

import { Blur } from '@ui/lib/types/utils/blur';
export const translateBlurEffects = (effect: readonly Effect[]): Blur | undefined => {
const blur = effect.find(effect => effect.type === 'LAYER_BLUR');
if (!blur) {
return;
}
return {
type: 'layer-blur',
value: blur.radius,
hidden: !blur.visible
};
};