UNPKG

@aurigma/design-atoms-interfaces

Version:

38 lines (37 loc) 1.58 kB
import { IContentItemData } from "./IContentItemData"; import { IImagePermissionsData } from "./IImagePermissionsData"; import { ImageEffect } from "./ImageEffect"; /** * A structure containing default parameters of images. * @remarks You can apply these parameters to the `image` object through either **clientConfig.json** or {@link https://customerscanvas.com/dev/editors/iframe-api/reference/design-editor-iframe/iconfiguration.html|IConfiguration}. * @example The following example shows how you can add image placeholders to the canvas and disallow changing of the z-order for them. * ```json * { * "defaultItemsConfig": { * "image": { * "name": "placeholder", * "addImageAsPlaceholder": true, * "overlayColor": "rgb(0,255,0)", * "itemPermissions": { * "allowZOrderChange": false * } * } * } * } * ``` * @public */ export interface IImageItemData<TOverlayEffect> extends IContentItemData { /** Defines permissions for images being added to the canvas. */ imagePermissions?: IImagePermissionsData; /** Allows adding images to the canvas as placeholders. The default value is `false`. */ addImageAsPlaceholder?: boolean; /** _Deprecated, use `overlayEffect` instead_. */ overlayColor?: string; /** Defines an overlay color for images being added to the canvas. */ overlayEffect?: TOverlayEffect; /** A link to the default image. */ imageUrl?: string; /** Defines an effect for images being added to the canvas. */ effect?: ImageEffect; }