mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 21:53:27 -05:00
16 lines
331 B
TypeScript
16 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
|
||
|
};
|
||
|
};
|