Skip to content

Commit d56ad74

Browse files
Added style props for actionSheet android
1 parent 3c2fd3f commit d56ad74

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

components/ActionSheet/actionSheetAndroid.js

+6-5
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ export default class ActionSheetAndroid extends Component {
124124
console.debug('close');
125125
}}
126126
>
127-
<View style={Style.wrapper}>
127+
<View style={[Style.wrapper, this.props.style]}>
128128
<Animated.View style={[Style.body, {top: this.state.animatedHeight}]}>
129129
<View style={[Style.hackWrapper,
130130
!cancelButtonIndex && Style.hackCancelStyle,
@@ -153,7 +153,7 @@ export default class ActionSheetAndroid extends Component {
153153
]}>
154154
<Text style={[
155155
Style.itemText, tintColor && {color: tintColor},
156-
destructiveButtonIndex === item.index && Style.deleteText]}>
156+
destructiveButtonIndex === item.index && Style.deleteText && this.props.destructiveTextStyle, destructiveButtonIndex !== item.index && this.props.itemTextStyle]}>
157157
{item.item}
158158
</Text>
159159
</View>
@@ -169,7 +169,7 @@ export default class ActionSheetAndroid extends Component {
169169
onPress={() => {this.choseItem(cancelButtonIndex);}} >
170170
<View style={[Style.itemCancel,
171171
(this.WHOLEACTIONHEIGHT < this.MAXACTIONHEIGHT) && Style.border]}>
172-
<Text style={[Style.itemText, Style.cancelText, tintColor && {color: tintColor}]}>{options[cancelButtonIndex]}</Text>
172+
<Text style={[Style.itemText, Style.cancelText, tintColor && {color: tintColor}, this.props.cancelTextStyle]}>{options[cancelButtonIndex]}</Text>
173173
</View>
174174
</TouchableHighlight>
175175
)}
@@ -184,10 +184,11 @@ const Style = StyleSheet.create({
184184
wrapper: {
185185
flex: 1,
186186
alignItems: 'center',
187-
backgroundColor: '#00000099'
187+
backgroundColor: '#00000099',
188+
justifyContent: 'flex-end'
188189
},
189190
body: {
190-
width: width - 20
191+
width: width - 20,
191192
},
192193
itemContainer: {
193194
alignItems: 'center',

0 commit comments

Comments
 (0)