From 8b809e96dee01637a421a60f964a6f2112b25b01 Mon Sep 17 00:00:00 2001 From: Ryan Brunner Date: Tue, 8 Dec 2015 15:51:49 -0500 Subject: [PATCH] Allow position to be set on help tooltip --- infl-components/help_tooltip.jsx | 5 +++-- .../source/js/patterns/molecules/help_tooltip_pattern.jsx | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/infl-components/help_tooltip.jsx b/infl-components/help_tooltip.jsx index ff782ed3..9ee410f9 100644 --- a/infl-components/help_tooltip.jsx +++ b/infl-components/help_tooltip.jsx @@ -11,13 +11,14 @@ var HelpTooltip = React.createClass({ getDefaultProps: function(){ return { - title : "" + title : "", + position : "top" }; }, render : function(){ return ( - }> + } position={this.props.position}> {this.props.children} ); diff --git a/infl-patternlab/source/js/patterns/molecules/help_tooltip_pattern.jsx b/infl-patternlab/source/js/patterns/molecules/help_tooltip_pattern.jsx index c5c6c34d..2d1134e0 100644 --- a/infl-patternlab/source/js/patterns/molecules/help_tooltip_pattern.jsx +++ b/infl-patternlab/source/js/patterns/molecules/help_tooltip_pattern.jsx @@ -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 : "[...] ",