This repository has been archived by the owner on Jun 3, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #74 from varmais/master
Add ActivityIndicator
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/** | ||
* https://github.com/facebook/react-native/blob/master/Libraries/Components/ActivityIndicator/ActivityIndicator.js | ||
*/ | ||
import React from 'react'; | ||
import NativeMethodsMixin from '../mixins/NativeMethodsMixin'; | ||
import View from './View'; | ||
import ColorPropType from '../propTypes/ColorPropType'; | ||
|
||
const { PropTypes } = React; | ||
|
||
const ActivityIndicator = React.createClass({ | ||
propTypes: { | ||
...View.propTypes, | ||
/** | ||
* Whether to show the indicator (true, the default) or hide it (false). | ||
*/ | ||
animating: PropTypes.bool, | ||
/** | ||
* The foreground color of the spinner (default is gray). | ||
*/ | ||
color: ColorPropType, | ||
/** | ||
* Whether the indicator should hide when not animating (true by default). | ||
*/ | ||
hidesWhenStopped: PropTypes.bool, | ||
/** | ||
* Size of the indicator. Small has a height of 20, large has a height of 36. | ||
*/ | ||
size: PropTypes.oneOf([ | ||
'small', | ||
'large', | ||
]), | ||
/** | ||
* Invoked on mount and layout changes with | ||
* | ||
* {nativeEvent: { layout: {x, y, width, height}}}. | ||
*/ | ||
onLayout: PropTypes.func, | ||
}, | ||
mixins: [NativeMethodsMixin], | ||
render() { | ||
return null; | ||
}, | ||
}); | ||
|
||
module.exports = ActivityIndicator; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters