@@ -8,6 +8,7 @@ import {BaseComponent} from '../../commons';
88import View from '../view' ;
99import Text from '../text' ;
1010import Button from '../button' ;
11+ import PageControl from '../pageControl' ;
1112import { HighlighterOverlayView } from '../../nativeComponents' ;
1213
1314
@@ -63,6 +64,14 @@ class FeatureHighlight extends BaseComponent {
6364 * Message to be displayed
6465 */
6566 message : PropTypes . string ,
67+ /**
68+ * Title text style
69+ */
70+ titleStyle : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . number , PropTypes . array ] ) ,
71+ /**
72+ * Message text style
73+ */
74+ messageStyle : PropTypes . oneOfType ( [ PropTypes . object , PropTypes . number , PropTypes . array ] ) ,
6675 /**
6776 * Title's max number of lines
6877 */
@@ -95,6 +104,10 @@ class FeatureHighlight extends BaseComponent {
95104 * Width of the border around the highlighted element
96105 */
97106 borderWidth : PropTypes . number ,
107+ /**
108+ * Border radius for the border corners around the highlighted element
109+ */
110+ borderRadius : PropTypes . number ,
98111 /**
99112 * The minimum size of the highlighted component (Android API 21+, and only when passing a ref in 'getTarget')
100113 */
@@ -105,7 +118,11 @@ class FeatureHighlight extends BaseComponent {
105118 /**
106119 * The padding of the highlight frame around the highlighted element's frame (only when passing ref in 'getTarget')
107120 */
108- innerPadding : PropTypes . number
121+ innerPadding : PropTypes . number ,
122+ /**
123+ * PageControl component's props
124+ */
125+ pageControlProps : PropTypes . shape ( PageControl . propTypes )
109126 } ;
110127
111128 constructor ( props ) {
@@ -216,7 +233,7 @@ class FeatureHighlight extends BaseComponent {
216233 }
217234
218235 renderHighlightMessage ( ) {
219- const { title, message, confirmButtonProps, textColor, titleNumberOfLines, messageNumberOfLines}
236+ const { title, message, titleStyle , messageStyle , confirmButtonProps, textColor, titleNumberOfLines, messageNumberOfLines}
220237 = this . getThemeProps ( ) ;
221238 const color = textColor || defaultTextColor ;
222239
@@ -227,12 +244,31 @@ class FeatureHighlight extends BaseComponent {
227244 pointerEvents = "box-none"
228245 >
229246 { title && (
230- < Text text60 style = { [ styles . title , { color} ] } numberOfLines = { titleNumberOfLines } pointerEvents = "none" >
247+ < Text text60
248+ style = { [
249+ styles . title ,
250+ {
251+ color,
252+ marginBottom : message ? titleBottomMargin : messageBottomMargin
253+ } ,
254+ titleStyle
255+ ] }
256+ numberOfLines = { titleNumberOfLines }
257+ pointerEvents = "none"
258+ >
231259 { title }
232260 </ Text >
233261 ) }
234262 { message && (
235- < Text text70 style = { [ styles . message , { color} ] } numberOfLines = { messageNumberOfLines } pointerEvents = "none" >
263+ < Text text70
264+ style = { [
265+ styles . message ,
266+ { color} ,
267+ messageStyle
268+ ] }
269+ numberOfLines = { messageNumberOfLines }
270+ pointerEvents = "none"
271+ >
236272 { message }
237273 </ Text >
238274 ) }
@@ -255,7 +291,7 @@ class FeatureHighlight extends BaseComponent {
255291 if ( contentTopPosition === undefined ) return null ;
256292
257293 const { testID, visible, highlightFrame, overlayColor, borderColor, borderWidth, minimumRectSize, innerPadding,
258- onBackgroundPress} = this . getThemeProps ( ) ;
294+ onBackgroundPress, borderRadius , pageControlProps } = this . getThemeProps ( ) ;
259295
260296 return (
261297 < HighlighterOverlayView
@@ -268,9 +304,16 @@ class FeatureHighlight extends BaseComponent {
268304 strokeWidth = { borderWidth || defaultStrokeWidth }
269305 minimumRectSize = { minimumRectSize }
270306 innerPadding = { innerPadding }
307+ borderRadius = { borderRadius }
271308 >
272309 < TouchableWithoutFeedback style = { styles . touchableOverlay } onPress = { onBackgroundPress } >
310+ { pageControlProps ?
311+ < View flex bottom >
312+ < PageControl { ...pageControlProps } containerStyle = { { marginBottom : 24 } } />
313+ </ View >
314+ :
273315 < View flex />
316+ }
274317 </ TouchableWithoutFeedback >
275318 { this . renderHighlightMessage ( ) }
276319 </ HighlighterOverlayView >
@@ -286,7 +329,6 @@ const styles = StyleSheet.create({
286329 alignItems : 'flex-start'
287330 } ,
288331 title : {
289- marginBottom : titleBottomMargin ,
290332 lineHeight : Typography . text60 . lineHeight ,
291333 fontWeight : '900'
292334 } ,
0 commit comments