Repository URL to install this package:
|
Version:
0.9.5 ▾
|
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
// modules
const react_1 = __importDefault(require("react"));
// domain
const Button_1 = require("atoms/Button");
const deps_1 = require("./deps");
class Telephone extends react_1.default.PureComponent {
render() {
const { renderIcon, render, attributes, telephone, shouldUseIcon } = deps_1.toAttributes(this.props);
// safety & defaults
if (!telephone) {
return '';
}
const iconView = renderIcon(attributes);
const numberView = render({ children: telephone });
return (react_1.default.createElement(Button_1.Button, Object.assign({}, attributes),
iconView,
numberView));
}
}
Telephone.defaultProps = {
shouldFormat: true,
shouldUseIcon: true,
};
exports.Telephone = Telephone;
exports.default = Telephone;
//# sourceMappingURL=Telephone.js.map