Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added style props for actionSheet android #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions components/ActionSheet/actionSheetAndroid.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default class ActionSheetAndroid extends Component {
console.debug('close');
}}
>
<View style={Style.wrapper}>
<View style={[Style.wrapper, this.props.style]}>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want to know what kind of style you want to change? the backgroundColor or sth else

<Animated.View style={[Style.body, {top: this.state.animatedHeight}]}>
<View style={[Style.hackWrapper,
!cancelButtonIndex && Style.hackCancelStyle,
Expand Down Expand Up @@ -153,7 +153,7 @@ export default class ActionSheetAndroid extends Component {
]}>
<Text style={[
Style.itemText, tintColor && {color: tintColor},
destructiveButtonIndex === item.index && Style.deleteText]}>
destructiveButtonIndex === item.index && Style.deleteText && this.props.destructiveTextStyle, destructiveButtonIndex !== item.index && this.props.itemTextStyle]}>
{item.item}
</Text>
</View>
Expand All @@ -169,7 +169,7 @@ export default class ActionSheetAndroid extends Component {
onPress={() => {this.choseItem(cancelButtonIndex);}} >
<View style={[Style.itemCancel,
(this.WHOLEACTIONHEIGHT < this.MAXACTIONHEIGHT) && Style.border]}>
<Text style={[Style.itemText, Style.cancelText, tintColor && {color: tintColor}]}>{options[cancelButtonIndex]}</Text>
<Text style={[Style.itemText, Style.cancelText, tintColor && {color: tintColor}, this.props.cancelTextStyle]}>{options[cancelButtonIndex]}</Text>
</View>
</TouchableHighlight>
)}
Expand All @@ -184,10 +184,11 @@ const Style = StyleSheet.create({
wrapper: {
flex: 1,
alignItems: 'center',
backgroundColor: '#00000099'
backgroundColor: '#00000099',
justifyContent: 'flex-end'
Copy link
Contributor

@lulutia lulutia Aug 21, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can not set justifyContent: 'flex-end' simply, because there's some calculation about it. maybe you can change this one, then i can merge this pr

},
body: {
width: width - 20
width: width - 20,
},
itemContainer: {
alignItems: 'center',
Expand Down