@gooddata/react-components
Version:
GoodData.UI - A powerful JavaScript library for building analytical applications
36 lines • 1.96 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
// (C) 2019-2020 GoodData Corporation
var React = require("react");
var react_intl_1 = require("react-intl");
var DropdownControl_1 = require("../DropdownControl");
var dropdowns_1 = require("../../../constants/dropdowns");
var translations_1 = require("../../../utils/translations");
var LegendPositionControl = /** @class */ (function (_super) {
__extends(LegendPositionControl, _super);
function LegendPositionControl() {
return _super !== null && _super.apply(this, arguments) || this;
}
LegendPositionControl.prototype.render = function () {
return (React.createElement(DropdownControl_1.default, { value: this.props.value, valuePath: "legend.position", labelText: "properties.legend.position", disabled: this.props.disabled, properties: this.props.properties, pushData: this.props.pushData, items: this.generateDropdownItems(), showDisabledMessage: this.props.showDisabledMessage }));
};
LegendPositionControl.prototype.generateDropdownItems = function () {
return translations_1.getTranslatedDropdownItems(dropdowns_1.legendPositionDropdownItems, this.props.intl);
};
return LegendPositionControl;
}(React.PureComponent));
exports.default = react_intl_1.injectIntl(LegendPositionControl);
//# sourceMappingURL=LegendPositionControl.js.map