Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

View File

@@ -0,0 +1,32 @@
'use strict';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = function (tip, children, getContent, multiline) {
if (children) return children;
if (getContent !== undefined && getContent !== null) return getContent; // getContent can be 0, '', etc.
if (getContent === null) return null; // Tip not exist and childern is null or undefined
var regexp = /<br\s*\/?>/;
if (!multiline || multiline === 'false' || !regexp.test(tip)) {
// No trim(), so that user can keep their input
return tip;
}
// Multiline tooltip content
return tip.split(regexp).map(function (d, i) {
return _react2.default.createElement(
'span',
{ key: i, className: 'multi-line' },
d
);
});
};
var _react = require('react');
var _react2 = _interopRequireDefault(_react);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }