Skip to content

Commit 3826248

Browse files
Asfalotmastermoo
authored andcommitted
Added style props to ActionButton.Item text container and text
1 parent 2aaeb29 commit 3826248

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

ActionButtonItem.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,11 @@ export default class ActionButtonItem extends Component {
7575
</TouchableOpacity>
7676
{this.props.title && (
7777
<TouchableOpacity
78-
style={this.getTextStyles()}
78+
style={[this.getTextStyles(), this.props.textContainerStyle]}
7979
activeOpacity={this.props.activeOpacity || 0.85}
8080
onPress={this.props.onPress}
8181
>
82-
<Text style={[styles.actionText, { color: this.props.titleColor || '#444' }]}>
82+
<Text style={[styles.actionText, this.props.textStyle, { color: this.props.titleColor || '#444' }]}>
8383
{this.props.title}
8484
</Text>
8585
</TouchableOpacity>

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Also this example uses `react-native-vector-icons` for the button Icons.
7979
```
8080

8181
### Show/hide the FAB on scroll
82-
Take a look at [this gist](https://gist.github.com/mmazzarolo/cfd467436f9d110e94a685b06eb3900f) for showing and hiding the floating action button depending on the scroll direction.
82+
Take a look at [this gist](https://gist.github.com/mmazzarolo/cfd467436f9d110e94a685b06eb3900f) for showing and hiding the floating action button depending on the scroll direction.
8383

8484
### Configuration
8585

@@ -114,3 +114,5 @@ Take a look at [this gist](https://gist.github.com/mmazzarolo/cfd467436f9d110e94
114114
| buttonColor | string | same as + button | background color of the Button
115115
| titleColor | string | "#444" | color of title
116116
| titleBgColor | string | "white" | background color of title
117+
| textContainerStyle | style | null | use this to set the textstyle of the button's item text container
118+
| textStyle | style | null | use this to set the textstyle of the button's item text

0 commit comments

Comments
 (0)