import { DropShadowData } from '@diez/prefabs' ; import { colorToCss } from './css-color' ; /**
 * Returns a string containing a valid CSS value for <box-shadow> and/or <text-shadow> from a [[Shadow]] prefab
 * instance.
 */ export const dropShadowToCss = ( shadow ) => { return `${ shadow . offset . x }px ${ shadow . offset . y }px ${ shadow . radius }px ${ colorToCss ( shadow . color ) }` ; } ; /**
 * Returns a string containing a valid CSS <filter> value from a [[Shadow]] prefab instance.
 */ export const dropShadowToFilterCss = ( shadow ) => { const radius = shadow . radius / 2 ; return `drop-shadow(${ shadow . offset . x }px ${ shadow . offset . y }px ${ radius }px ${ colorToCss ( shadow . color ) })` ; } ;