simple-react-ui
Version:
a simple react component library written in TypeScript+ React.js
33 lines • 1.29 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var 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 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 });
var React = require("react");
/**
* Carousel 的分项的指示器 Indicator
*/
var Indicator = /** @class */ (function (_super) {
__extends(Indicator, _super);
function Indicator() {
return _super !== null && _super.apply(this, arguments) || this;
}
Indicator.prototype.render = function () {
return (React.createElement("li", { className: this.props.active ? 'active' : '', onClick: this.props.onClick }));
};
Indicator.defaultProps = {
active: false,
onClick: function () { }
};
return Indicator;
}(React.Component));
exports.Indicator = Indicator;
exports.default = Indicator;
//# sourceMappingURL=indicator.js.map