ayand04

Untitled

Nov 20th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. import React, { Component } from 'react';
  2. import PropTypes from 'prop-types';
  3. import {
  4. Animated,
  5. View,
  6. StatusBar
  7. } from 'react-native';
  8. import { getStatusBarHeight } from "../../utils";
  9.  
  10. export default class CustomStatusBar extends Component
  11. {
  12. static propTypes = {
  13. themeColor: PropTypes.string.isRequired,
  14. elevation: PropTypes.oneOfType([
  15. PropTypes.number,
  16. PropTypes.object
  17. ]).isRequired
  18. };
  19.  
  20. render() {
  21. const {themeColor, elevation} = this.props;
  22.  
  23. return (
  24. <Animated.View style={{ backgroundColor: themeColor, height: getStatusBarHeight(), elevation: elevation }}>
  25. <StatusBar backgroundColor="rgba(0, 0, 0, 0.05)" translucent />
  26. </Animated.View>
  27. );
  28. }
  29. }
Add Comment
Please, Sign In to add comment