UNPKG

zeplin-extension-style-kit

Version:

Models and utilities to generate CSS-like style code in Zeplin extensions.

25 lines (18 loc) 568 B
import { StyleDeclaration } from "../common.js"; import { STYLE_PROPS } from "../constants.js"; type ObjectFitValue = "fill" | "contain" | "cover" | "none" | "scale-down"; export class ObjectFit implements StyleDeclaration { private value: ObjectFitValue; constructor(value: ObjectFitValue) { this.value = value; } get name(): string { return STYLE_PROPS.OBJECT_FIT; } equals(other: ObjectFit): boolean { return this.value === other.value; } getValue(): ObjectFitValue { return this.value; } }