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

Allow the ability to override activeOpacity in CardItem #1453

Closed
davidvuong opened this issue Dec 14, 2017 · 1 comment
Closed

Allow the ability to override activeOpacity in CardItem #1453

davidvuong opened this issue Dec 14, 2017 · 1 comment

Comments

@davidvuong
Copy link

Here: https://github.com/GeekyAnts/NativeBase/blob/master/src/basic/CardItem.js#L8-L28

class CardItem extends Component {
	render() {
		if (this.props.button) {
			return (
				<TouchableOpacity
					ref={c => (this._root = c)}
					{...this.props}
					activeOpacity={this.props.button ? 0.2 : 1}
				>
					{this.props.children}
				</TouchableOpacity>
			);
		} else {
			return (
				<View ref={c => (this._root = c)} {...this.props}>
					{this.props.children}
				</View>
			);
		}
	}
}

When button is specified, you hardcode the activeOpacity to 0.2. Can this be changed so that activeOpacity can be overridden?

akhil-ga added a commit that referenced this issue Dec 15, 2017
Added activeOpacity props for CardItem.
SupriyaKalghatgi added a commit that referenced this issue Dec 21, 2017
…acityProps

Enhancement for issue #1453. Added activeOpacity prop for CardItem.
@SupriyaKalghatgi
Copy link
Contributor

Fixed with 2.3.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants