From f026676e23b4974fa27cc0d38fb45f914de72946 Mon Sep 17 00:00:00 2001 From: zahra Date: Thu, 28 Dec 2017 12:21:32 +0000 Subject: [PATCH 1/2] refactor: migrate organization screen to styled-components --- .../screens/organization-profile.screen.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/organization/screens/organization-profile.screen.js b/src/organization/screens/organization-profile.screen.js index 6ac928921..b1a2d7e93 100644 --- a/src/organization/screens/organization-profile.screen.js +++ b/src/organization/screens/organization-profile.screen.js @@ -1,7 +1,8 @@ import React, { Component } from 'react'; +import styled from 'styled-components/native'; import { bindActionCreators } from 'redux'; import { connect } from 'react-redux'; -import { StyleSheet, RefreshControl } from 'react-native'; +import { RefreshControl } from 'react-native'; import { ListItem } from 'react-native-elements'; import { createStructuredSelector } from 'reselect'; import ActionSheet from 'react-native-actionsheet'; @@ -47,16 +48,16 @@ const actionCreators = { const actions = dispatch => bindActionCreators(actionCreators, dispatch); -const styles = StyleSheet.create({ - listTitle: { +const DescriptionListItem = styled(ListItem).attrs({ + titleStyle: { color: colors.black, ...fonts.fontPrimary, }, - listSubTitle: { + subtitleStyle: { color: colors.greyDark, ...fonts.fontPrimary, }, -}); +})``; class OrganizationProfile extends Component { props: { @@ -172,9 +173,8 @@ class OrganizationProfile extends Component { - From 3dbc799b800187940ace9f94681aa3e447dd1a52 Mon Sep 17 00:00:00 2001 From: zahra Date: Thu, 28 Dec 2017 12:43:30 +0000 Subject: [PATCH 2/2] refactor: remove unused style from organization screen --- src/organization/screens/organization-profile.screen.js | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/organization/screens/organization-profile.screen.js b/src/organization/screens/organization-profile.screen.js index b1a2d7e93..34fedd2c2 100644 --- a/src/organization/screens/organization-profile.screen.js +++ b/src/organization/screens/organization-profile.screen.js @@ -49,10 +49,6 @@ const actionCreators = { const actions = dispatch => bindActionCreators(actionCreators, dispatch); const DescriptionListItem = styled(ListItem).attrs({ - titleStyle: { - color: colors.black, - ...fonts.fontPrimary, - }, subtitleStyle: { color: colors.greyDark, ...fonts.fontPrimary,