patternity
Advanced tools
Comparing version 1.0.37 to 1.0.38
@@ -36,3 +36,10 @@ var React = require('react'); | ||
isClickable={false} | ||
onOpen={this._handleOnOpen}> | ||
onOpen={this._handleOnOpen} | ||
style={{ | ||
content: { | ||
minWidth: '100px', | ||
padding: '2px 5px', | ||
fontSize: '12px' | ||
} | ||
}}> | ||
{this.props.description} | ||
@@ -39,0 +46,0 @@ </Tooltip> |
@@ -27,3 +27,3 @@ 'use strict'; | ||
popoverElements.arrow.style.left = popoverElements.element.offsetWidth / 2 - popoverElements.arrow.offsetWidth / 2 + 'px'; | ||
popoverElements.arrow.style[position] = -1 * (popoverElements.arrow.offsetHeight + 4) + 'px'; | ||
popoverElements.arrow.style[position] = -1 * popoverElements.arrow.offsetHeight + 'px'; | ||
} | ||
@@ -30,0 +30,0 @@ |
var React = require('react'); | ||
var _ = require('lodash'); | ||
var $ = require('jquery'); | ||
@@ -14,3 +15,10 @@ | ||
containerSelector: React.PropTypes.string, | ||
onOpen: React.PropTypes.func | ||
onOpen: React.PropTypes.func, | ||
style: React.PropTypes.shape({ | ||
content : { | ||
minWidth: React.PropTypes.string.isRequired, | ||
padding: React.PropTypes.string.isRequired, | ||
fontSize: React.PropTypes.string.isRequired | ||
} | ||
}) | ||
}, | ||
@@ -24,3 +32,10 @@ | ||
containerSelector: 'body', | ||
onOpen: function() {} | ||
onOpen: function() {}, | ||
style: { | ||
content : { | ||
minWidth: '300px', | ||
padding: '13px 13px 26px 13px', | ||
fontSize: '13px' | ||
} | ||
} | ||
}; | ||
@@ -31,3 +46,3 @@ }, | ||
return { | ||
showTooltip: false, | ||
showTooltip: true, | ||
showClose: false, | ||
@@ -56,3 +71,3 @@ wasClicked: false | ||
style={this.styles.popover.popover2}> | ||
<div ref="tip" className="pt-tooltip-content" style={this.styles.popover.content}> | ||
<div ref="tip" className="pt-tooltip-content" style={this._determineContentStyle()}> | ||
<CloseTooltip | ||
@@ -69,2 +84,6 @@ onClick={this._closeTooltip} | ||
_determineContentStyle: function() { | ||
return _.merge(this.styles.popover.content, this.props.style.content); | ||
}, | ||
_tooltipElement: function(){ | ||
@@ -131,5 +150,2 @@ return ( | ||
width: '100%', | ||
minWidth: '300px', | ||
fontSize: '13px', | ||
padding: '13px 13px 26px 13px', | ||
position: 'relative' | ||
@@ -136,0 +152,0 @@ }, |
{ | ||
"name": "patternity", | ||
"version": "1.0.37", | ||
"version": "1.0.38", | ||
"description": "Patternity is the pattern library and style guide for all Influitive apps", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -16,3 +16,3 @@ import $ from 'jquery'; | ||
popoverElements.arrow.style.left = ((popoverElements.element.offsetWidth / 2) - (popoverElements.arrow.offsetWidth / 2)) + 'px'; | ||
popoverElements.arrow.style[position] = -1 * (popoverElements.arrow.offsetHeight + 4) + 'px'; | ||
popoverElements.arrow.style[position] = -1 * popoverElements.arrow.offsetHeight + 'px'; | ||
} | ||
@@ -19,0 +19,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
2921961
28139