0
Fork 0
mirror of https://github.com/penpot/penpot-exporter-figma-plugin.git synced 2024-12-22 05:33:02 -05:00
penpot-exporter-figma-plugin/plugin-src/translators/translateBlurEffects.ts
Alex Sánchez c71eb8e736
Layer Blur (#103)
* layer blur

* changeset
2024-05-13 13:23:19 +02:00

15 lines
331 B
TypeScript

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
};
};