mirror of
https://github.com/penpot/penpot-exporter-figma-plugin.git
synced 2024-12-22 13:43:03 -05:00
shadow
This commit is contained in:
parent
3852805ffc
commit
cdf07cc611
3 changed files with 26 additions and 4 deletions
4
src/ui/lib/types/shape.d.ts
vendored
4
src/ui/lib/types/shape.d.ts
vendored
|
@ -5,6 +5,7 @@ import { Interaction } from './utils/interactions/interaction';
|
|||
import { Matrix } from './utils/matrix';
|
||||
import { Point } from './utils/point';
|
||||
import { Selrect } from './utils/selrect';
|
||||
import { Shadow } from './utils/shadow';
|
||||
import { Stroke } from './utils/stroke';
|
||||
|
||||
export type Shape = {
|
||||
|
@ -45,8 +46,7 @@ export type Shape = {
|
|||
transformInverse?: Matrix;
|
||||
blendMode?: string;
|
||||
interactions?: Interaction[];
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
shadow?: any;
|
||||
shadow?: Shadow;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
blur?: any;
|
||||
growType?: 'auto-width' | 'auto-height' | 'fixed';
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
import { Uuid } from '../uuid';
|
||||
import { ActionType } from './actionType';
|
||||
import { Animation } from './animation';
|
||||
import { EventType } from './eventType';
|
||||
|
@ -6,14 +7,14 @@ import { OverlayPositioningType } from './overlayPositioningType';
|
|||
export type Interaction = {
|
||||
eventType: EventType;
|
||||
actionType: ActionType;
|
||||
destination?: string;
|
||||
destination?: Uuid;
|
||||
preserveScroll?: boolean;
|
||||
animation?: Animation;
|
||||
overlayPosition?: { x: number; y: number };
|
||||
overlayPosType?: OverlayPositioningType;
|
||||
closeClickOutside?: boolean;
|
||||
backgroundOverlay?: boolean;
|
||||
positionRelativeTo?: string;
|
||||
positionRelativeTo?: Uuid;
|
||||
url?: string;
|
||||
delay?: number;
|
||||
};
|
||||
|
|
21
src/ui/lib/types/utils/shadow.d.ts
vendored
Normal file
21
src/ui/lib/types/utils/shadow.d.ts
vendored
Normal file
|
@ -0,0 +1,21 @@
|
|||
import { Gradient } from './gradient';
|
||||
import { Uuid } from './uuid';
|
||||
|
||||
type ShadowStyle = 'drop-shadow' | 'inner-shadow';
|
||||
|
||||
export type Shadow = {
|
||||
id?: Uuid;
|
||||
style: ShadowStyle;
|
||||
offsetX: number;
|
||||
offsetY: number;
|
||||
blur: number;
|
||||
spread: number;
|
||||
hidden: boolean;
|
||||
color: {
|
||||
color?: string;
|
||||
opacity?: number;
|
||||
gradient?: Gradient;
|
||||
fileId?: Uuid;
|
||||
id?: Uuid;
|
||||
};
|
||||
};
|
Loading…
Reference in a new issue