@atlaskit/editor-plugin-media-editing
Version:
MediaEditing plugin for @atlaskit/editor-core
43 lines (42 loc) • 2.32 kB
JavaScript
/* RatioIcon.tsx generated by @compiled/babel-plugin v0.39.1 */
"use strict";
var _typeof = require("@babel/runtime/helpers/typeof");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.RatioIcon = void 0;
require("./RatioIcon.compiled.css");
var React = _interopRequireWildcard(require("react"));
var _runtime = require("@compiled/react/runtime");
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
var sizeStyles = {
small: "_1bsbgktf _4t3igktf",
medium: "_1bsb1tcg _4t3i1tcg",
large: "_1bsbzwfg _4t3izwfg",
xlarge: "_1bsbckbl _4t3ickbl"
};
var svgStyles = null;
var RatioIcon = exports.RatioIcon = function RatioIcon(_ref) {
var label = _ref.label,
_ref$size = _ref.size,
size = _ref$size === void 0 ? 'small' : _ref$size,
_ref$primaryColor = _ref.primaryColor,
primaryColor = _ref$primaryColor === void 0 ? 'currentColor' : _ref$primaryColor,
secondaryColor = _ref.secondaryColor,
isDisabled = _ref.isDisabled;
return /*#__PURE__*/React.createElement("svg", {
viewBox: "0 0 16 16",
xmlns: "http://www.w3.org/2000/svg",
style: {
color: primaryColor,
fill: secondaryColor,
opacity: isDisabled ? 0.5 : 1
},
"aria-label": label || undefined,
role: label ? 'img' : 'presentation',
className: (0, _runtime.ax)(["_1reo15vq _18m915vq _lswuvuon _lcxvglyw", sizeStyles[size]])
}, /*#__PURE__*/React.createElement("path", {
d: "M3 10V13H6V14.5H2.875C2.11561 14.5 1.5 13.8844 1.5 13.125V10H3ZM14.5 13.125C14.5 13.8844 13.8844 14.5 13.125 14.5H10V13H13V10H14.5V13.125ZM13.125 1.5C13.8844 1.5 14.5 2.11561 14.5 2.875V6H13V3H10V1.5H13.125ZM6 3H3V6H1.5V2.875C1.5 2.11561 2.11561 1.5 2.875 1.5H6V3Z",
fill: primaryColor
}));
};