@@ -30,6 +30,7 @@ const AppBar = React.createClass({
30
30
propTypes : {
31
31
onLeftIconButtonTouchTap : React . PropTypes . func ,
32
32
onRightIconButtonTouchTap : React . PropTypes . func ,
33
+ onTitleTouchTap : React . PropTypes . func ,
33
34
showMenuIconButton : React . PropTypes . bool ,
34
35
style : React . PropTypes . object ,
35
36
iconClassNameLeft : React . PropTypes . string ,
@@ -162,8 +163,8 @@ const AppBar = React.createClass({
162
163
// If the title is a string, wrap in an h1 tag.
163
164
// If not, just use it as a node.
164
165
titleElement = typeof title === 'string' || title instanceof String ?
165
- < h1 style = { this . prepareStyles ( styles . title , styles . mainElement ) } > { title } </ h1 > :
166
- < div style = { this . prepareStyles ( styles . mainElement ) } > { title } </ div > ;
166
+ < h1 onTouchTap = { this . _onTitleTouchTap } style = { this . prepareStyles ( styles . title , styles . mainElement ) } > { title } </ h1 > :
167
+ < div onTouchTap = { this . _onTitleTouchTap } style = { this . prepareStyles ( styles . mainElement ) } > { title } </ div > ;
167
168
}
168
169
169
170
if ( showMenuIconButton ) {
@@ -254,6 +255,12 @@ const AppBar = React.createClass({
254
255
}
255
256
} ,
256
257
258
+ _onTitleTouchTap ( event ) {
259
+ if ( this . props . onTitleTouchTap ) {
260
+ this . props . onTitleTouchTap ( event ) ;
261
+ }
262
+ } ,
263
+
257
264
} ) ;
258
265
259
266
module . exports = AppBar ;
0 commit comments