From 2fb5ded51726a8f0bc82cd627bc9973aa2d52102 Mon Sep 17 00:00:00 2001 From: ue Date: Fri, 23 Nov 2018 14:16:26 +0300 Subject: [PATCH] place holders implemented for dark theme --- .../view/postCardPlaceHolderView.js | 13 ++-- .../view/postPlaceHolderView.js | 67 +++++++++++-------- .../view/profileSummaryPlaceHolder.js | 48 +++++++------ .../view/walletDetailsPlaceHolder.js | 49 ++++++++------ 4 files changed, 103 insertions(+), 74 deletions(-) diff --git a/src/components/basicUIElements/view/postCardPlaceHolderView.js b/src/components/basicUIElements/view/postCardPlaceHolderView.js index 23053c26a..0ca5f6567 100644 --- a/src/components/basicUIElements/view/postCardPlaceHolderView.js +++ b/src/components/basicUIElements/view/postCardPlaceHolderView.js @@ -1,19 +1,20 @@ import React from 'react'; +import { connect } from 'react-redux'; import { View } from 'react-native'; -import { connect } from "react-redux"; import Placeholder from 'rn-placeholder'; import styles from './postCardPlaceHolderStyles'; - +// TODO: make container for place holder wrapper after alpha const PostCardPlaceHolder = (props) => { - const color = props.isDarkTheme ? "#2e3d51" : "#f6f6f6"; + const color = props.isDarkTheme ? '#2e3d51' : '#f5f5f5'; + return ( - + { ); -} - - +}; const mapStateToProps = state => ({ isDarkTheme: state.application.isDarkTheme, diff --git a/src/components/basicUIElements/view/postPlaceHolderView.js b/src/components/basicUIElements/view/postPlaceHolderView.js index 98b10480d..41ce93256 100644 --- a/src/components/basicUIElements/view/postPlaceHolderView.js +++ b/src/components/basicUIElements/view/postPlaceHolderView.js @@ -1,36 +1,47 @@ import React from 'react'; +import { connect } from 'react-redux'; import { View } from 'react-native'; import Placeholder from 'rn-placeholder'; import styles from './postCardPlaceHolderStyles'; +// TODO: make container for place holder wrapper after alpha +const PostPlaceHolder = (props) => { + const color = props.isDarkTheme ? '#2e3d51' : '#f5f5f5'; -const PostPlaceHolder = () => ( - - - + return ( + + + + + + + + + - - - - - - -); + ); +}; -export default PostPlaceHolder; +const mapStateToProps = state => ({ + isDarkTheme: state.application.isDarkTheme, +}); + +export default connect(mapStateToProps)(PostPlaceHolder); diff --git a/src/components/basicUIElements/view/profileSummaryPlaceHolder.js b/src/components/basicUIElements/view/profileSummaryPlaceHolder.js index 89764dff4..8c9830e9c 100644 --- a/src/components/basicUIElements/view/profileSummaryPlaceHolder.js +++ b/src/components/basicUIElements/view/profileSummaryPlaceHolder.js @@ -1,27 +1,37 @@ import React from 'react'; +import { connect } from 'react-redux'; import { View } from 'react-native'; import Placeholder from 'rn-placeholder'; import styles from './profileSummaryPlaceHolderStyles'; +// TODO: make container for place holder wrapper after alpha +const ProfileSummaryPlaceHolder = (props) => { + const color = props.isDarkTheme ? '#2e3d51' : '#f5f5f5'; -const ProfileSummaryPlaceHolder = () => ( - - - + return ( + + + + + + + + - - - - - -); + ); +}; -export default ProfileSummaryPlaceHolder; +const mapStateToProps = state => ({ + isDarkTheme: state.application.isDarkTheme, +}); + +export default connect(mapStateToProps)(ProfileSummaryPlaceHolder); diff --git a/src/components/basicUIElements/view/walletDetailsPlaceHolder.js b/src/components/basicUIElements/view/walletDetailsPlaceHolder.js index 8406f6d02..13d3c7749 100644 --- a/src/components/basicUIElements/view/walletDetailsPlaceHolder.js +++ b/src/components/basicUIElements/view/walletDetailsPlaceHolder.js @@ -1,27 +1,36 @@ import React from 'react'; +import { connect } from 'react-redux'; import { View } from 'react-native'; import Placeholder from 'rn-placeholder'; import styles from './walletDetailsPlaceHolderStyles'; -const WalletDetailsPlaceHolder = () => ( - - - - - - - - - - - - - - - - - -); +const WalletDetailsPlaceHolder = (props) => { + const color = props.isDarkTheme ? '#2e3d51' : '#f5f5f5'; -export default WalletDetailsPlaceHolder; + return ( + + + + + + + + + + + + + + + + + + ); +}; + +const mapStateToProps = state => ({ + isDarkTheme: state.application.isDarkTheme, +}); + +export default connect(mapStateToProps)(WalletDetailsPlaceHolder);