Repository URL to install this package:
|
Version:
2.7.11 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
const tslib_1 = require("tslib"); // modules
const react_1 = tslib_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