Skip to content

Commit

Permalink
added css injection into header
Browse files Browse the repository at this point in the history
  • Loading branch information
justinrhodes1 committed Nov 26, 2018
1 parent 8a05b82 commit bf3c21f
Show file tree
Hide file tree
Showing 18 changed files with 214 additions and 595 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -70,7 +70,7 @@ export default Example;
| fontSize | string: px | 'inherit' | Font size of text |
| fontWeight | string | 'bold' | Font weight of text |
| color | string | 'inherit' | Font color of text |
| animation | string: fade _or_ fadeUpDown _or_ bounce | 'fade' | Mount/Unmount anmation. Custom animations: See advanced usage examples. |
| animation | string: fade _or_ bounce | 'fade' | Mount/Unmount anmation. Custom animations: See advanced usage examples. |
| delayUnmount | number | 150 | Delay component unmounting to allow for animations |
| hoverBackground | string: hex colors | '#ececec' | Background color on hover |
| hoverColor | string: hex colors | '#000000' | Font color on hover |
Expand Down
231 changes: 0 additions & 231 deletions lib/Tooltip/TextBox.jsx

This file was deleted.

13 changes: 11 additions & 2 deletions lib/Tooltip/index.js
Expand Up @@ -13,7 +13,7 @@ var _TextBox = _interopRequireDefault(require("./TextBox"));

var _Arrow = _interopRequireDefault(require("./Arrow"));

require("./style.css");
var _styles = _interopRequireDefault(require("./styles"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

Expand Down Expand Up @@ -79,7 +79,16 @@ function (_Component) {
value: function componentWillMount() {
var _this2 = this;

// Basic prop type checking
// Injecting styles directly into header
if (!document.getElementById('rpt-css')) {
var $style = document.createElement('style');
$style.type = 'text/css';
$style.id = 'rpt-css';
document.head.appendChild($style);
$style.innerHTML = _styles.default;
} // Basic prop type checking


Object.keys(this.props).forEach(function (propName) {
var type = _typeof(_this2.props[propName]);

Expand Down

0 comments on commit bf3c21f

Please sign in to comment.