Skip to content

Commit

Permalink
Merge pull request #124 from influitive/feature/help_tooltip_position
Browse files Browse the repository at this point in the history
Allow position to be set on help tooltip
  • Loading branch information
nickfaulkner committed Dec 8, 2015
2 parents 50c6fc6 + 8b809e9 commit 6edf851
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
5 changes: 3 additions & 2 deletions infl-components/help_tooltip.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ var HelpTooltip = React.createClass({

getDefaultProps: function(){
return {
title : ""
title : "",
position : "top"
};
},

render : function(){
return (
<Tooltip title={this.props.title} element={<Icon icon="question-circle-o" />}>
<Tooltip title={this.props.title} element={<Icon icon="question-circle-o" />} position={this.props.position}>
{this.props.children}
</Tooltip>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@ var HelpTooltipPattern = React.createClass({
required : false,
description : "Title of the help tooltip."
},
position : {
type : "string",
defaultValue : "top",
required : false,
description : "The position of the tooltip (either top or bottom)."
},
children : {
type : "string",
defaultValue : "[...] ",
Expand Down

0 comments on commit 6edf851

Please sign in to comment.