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

Extended icon and selectedIcon propType to include scale #5131

Closed
wants to merge 1 commit into from
Closed
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
16 changes: 14 additions & 2 deletions Libraries/Components/TabBarIOS/TabBarItemIOS.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,24 @@ var TabBarItemIOS = React.createClass({
/**
* A custom icon for the tab. It is ignored when a system icon is defined.
*/
icon: Image.propTypes.source,
icon: React.PropTypes.oneOfType([
React.PropTypes.shape({
uri: React.PropTypes.string,
scale: React.PropTypes.number,
}),
React.PropTypes.number,
]),
/**
* A custom icon when the tab is selected. It is ignored when a system
* icon is defined. If left empty, the icon will be tinted in blue.
*/
selectedIcon: Image.propTypes.source,
selectedIcon: React.PropTypes.oneOfType([
React.PropTypes.shape({
uri: React.PropTypes.string,
scale: React.PropTypes.number,
}),
React.PropTypes.number,
]),
/**
* Callback when this tab is being selected, you should change the state of your
* component to set selected={true}.
Expand Down