From 551c0b0c04318a4eedba9486d060eecb46c305ad Mon Sep 17 00:00:00 2001 From: Mehdi Achour Date: Wed, 25 Apr 2018 17:31:43 +0100 Subject: [PATCH] refactor(styled-components): migrate LoadingModal --- .../loading-modal.component.js | 31 +++++++++---------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/src/components/loading-indicators/loading-modal.component.js b/src/components/loading-indicators/loading-modal.component.js index 7e62c3bfb..23ace01e3 100644 --- a/src/components/loading-indicators/loading-modal.component.js +++ b/src/components/loading-indicators/loading-modal.component.js @@ -1,24 +1,23 @@ import React from 'react'; -import { StyleSheet, View, Modal, ActivityIndicator } from 'react-native'; +import { Modal, ActivityIndicator } from 'react-native'; +import styled from 'styled-components'; -const styles = StyleSheet.create({ - container: { - flex: 1, - position: 'absolute', - top: 0, - left: 0, - right: 0, - bottom: 0, - backgroundColor: 'rgba(0, 0, 0, 0.8)', - justifyContent: 'center', - alignItems: 'center', - }, -}); +const Container = styled.View` + flex: 1; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.8); + justify-content: center; + align-items: center; +`; export const LoadingModal = () => ( null}> - + - + );