office-ui-fabric-react
Version: 
Reusable React components for building experiences for Office 365.
31 lines • 1.43 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = require("react");
var Utilities_1 = require("../../../Utilities");
var Beak_styles_1 = require("./Beak.styles");
var Beak = /** @class */ (function (_super) {
    tslib_1.__extends(Beak, _super);
    function Beak(props) {
        return _super.call(this, props) || this;
    }
    Beak.prototype.render = function () {
        var _a = this.props, _b = _a.height, height = _b === void 0 ? 18 : _b, _c = _a.width, width = _c === void 0 ? 18 : _c, left = _a.left, top = _a.top;
        var getClassNames = Utilities_1.classNamesFunction();
        var classNames = getClassNames(Beak_styles_1.getStyles, {
            left: left,
            top: top,
            height: height + 'px',
            width: width + 'px'
        });
        var pointOne = width / 2 + ',' + 0;
        var pointTwo = width + ',' + height;
        var pointThree = 0 + ',' + height;
        return (React.createElement("div", { className: Utilities_1.css('ms-Beak', classNames.root) },
            React.createElement("svg", { height: height, width: width, className: classNames.beak },
                React.createElement("polygon", { points: pointOne + ' ' + pointTwo + ' ' + pointThree }))));
    };
    return Beak;
}(Utilities_1.BaseComponent));
exports.Beak = Beak;
//# sourceMappingURL=Beak.js.map