mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 11:57:46 +08:00
Prettier React Native Libraries
Reviewed By: sahrens Differential Revision: D7961488 fbshipit-source-id: 05f9b8b0b91ae77f9040a5321ccc18f7c3c1ce9a
This commit is contained in:
committed by
Facebook Github Bot
parent
1e2de71290
commit
d01ab66b47
@@ -4,6 +4,7 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
@@ -82,12 +83,14 @@ const ToolbarAndroid = createReactClass({
|
||||
* `ifRoom` or `never`
|
||||
* * `showWithText`: boolean, whether to show text alongside the icon or not
|
||||
*/
|
||||
actions: PropTypes.arrayOf(PropTypes.shape({
|
||||
title: PropTypes.string.isRequired,
|
||||
icon: optionalImageSource,
|
||||
show: PropTypes.oneOf(['always', 'ifRoom', 'never']),
|
||||
showWithText: PropTypes.bool
|
||||
})),
|
||||
actions: PropTypes.arrayOf(
|
||||
PropTypes.shape({
|
||||
title: PropTypes.string.isRequired,
|
||||
icon: optionalImageSource,
|
||||
show: PropTypes.oneOf(['always', 'ifRoom', 'never']),
|
||||
showWithText: PropTypes.bool,
|
||||
}),
|
||||
),
|
||||
/**
|
||||
* Sets the toolbar logo.
|
||||
*/
|
||||
@@ -183,7 +186,8 @@ const ToolbarAndroid = createReactClass({
|
||||
action.icon = resolveAssetSource(action.icon);
|
||||
}
|
||||
if (action.show) {
|
||||
action.show = UIManager.ToolbarAndroid.Constants.ShowAsAction[action.show];
|
||||
action.show =
|
||||
UIManager.ToolbarAndroid.Constants.ShowAsAction[action.show];
|
||||
}
|
||||
nativeActions.push(action);
|
||||
}
|
||||
@@ -206,7 +210,7 @@ const ToolbarAndroid = createReactClass({
|
||||
const NativeToolbar = requireNativeComponent('ToolbarAndroid', ToolbarAndroid, {
|
||||
nativeOnly: {
|
||||
nativeActions: true,
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
module.exports = ToolbarAndroid;
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = require('UnimplementedView');
|
||||
|
||||
Reference in New Issue
Block a user