react-native-overlay 介绍
react-native-overlay 是一个
示例:
var React = require('react-native'); var Overlay = require('react-native-overlay'); var BlurView = require('react-native-blur').BlurView; var { View, ActivityIndicatorIOS, StyleSheet, } = React; var LoadingOverlay = React.createClass({ getDefaultProps(): StateObject { return { isVisible: false } }, render(): ReactElement { return ( <Overlay isVisible={this.props.isVisible}> <BlurView style={styles.background} blurType="dark"> <ActivityIndicatorIOS size="large" animating={true} style={styles.spinner} /> </BlurView> </Overlay> ); } }); var styles = StyleSheet.create({ background: { flex: 1, justifyContent: 'center', }, }) module.exports = LoadingOverlay;
react-native-overlay 官网
https://github.com/brentvatne/react-native-overlay
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。