Skip to content
This repository was archived by the owner on Feb 4, 2021. It is now read-only.

Commit 483b5e4

Browse files
committed
Merge pull request #66 from ouel92/master
Small tweak to allow children on Toolbar
2 parents 431d95e + 7ff4e4c commit 483b5e4

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

lib/Toolbar.js

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,15 +82,19 @@ export default class Toolbar extends Component {
8282
</IconToggle>
8383
)
8484
}
85-
<Text
86-
numberOfLines={1}
87-
style={[styles.title, TYPO.paperFontTitle, {
88-
color: styleMap.color,
89-
marginLeft: icon ? styles.title.marginLeft : 16
90-
}]}
91-
>
92-
{title}
93-
</Text>
85+
{
86+
!title ? this.props.children : (
87+
<Text
88+
numberOfLines={1}
89+
style={[styles.title, TYPO.paperFontTitle, {
90+
color: styleMap.color,
91+
marginLeft: icon ? styles.title.marginLeft : 16
92+
}]}
93+
>
94+
{title}
95+
</Text>
96+
)
97+
}
9498
{
9599
actions &&
96100
actions.map(function (action, i) {

0 commit comments

Comments
 (0)