UNPKG

zeplin-extension-style-kit

Version:

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

44 lines (34 loc) 1.49 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; var _constants = require("../constants"); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var BackgroundColor = /*#__PURE__*/function () { function BackgroundColor(color) { _classCallCheck(this, BackgroundColor); this.color = color; } _createClass(BackgroundColor, [{ key: "equals", value: function equals(other) { return this.color.equals(other.color); } }, { key: "getValue", value: function getValue(params, variables) { return this.color.toStyleValue(params, variables); } }, { key: "name", get: function get() { return _constants.STYLE_PROPS.BACKGROUND_COLOR; } }]); return BackgroundColor; }(); var _default = BackgroundColor; exports.default = _default;