From dad7fe22ddb8e37a3c6e015f67791ef243047026 Mon Sep 17 00:00:00 2001 From: Phi Dong Date: Wed, 18 Oct 2017 21:42:17 -0700 Subject: [PATCH] chore(*): style view-container.component.js Converted view-container.component.js to use styled components BREAKING CHANGE: none none --- .all-contributorsrc | 11 +++++++++-- CONTRIBUTORS.md | 6 +++--- src/components/view-container.component.js | 23 +++++++++++----------- 3 files changed, 23 insertions(+), 17 deletions(-) diff --git a/.all-contributorsrc b/.all-contributorsrc index 1ba64a7cd..10129b73c 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -391,8 +391,8 @@ "contributions": [ "code" ] - }, - { + }, + { "login": "Jpfonseca", "name": "João Fonseca", "avatar_url": "https://avatars2.githubusercontent.com/u/11836470?v=4", @@ -490,6 +490,13 @@ "contributions": [ "code" ] + }, + { + "login": "pdong", + "name": "Phi Dong", + "avatar_url": "https://avatars2.githubusercontent.com/u/5158502?v=4", + "profile": "http://www.phidong.com", + "contributions": [] } ] } diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 187aa49b9..bd8d97b92 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -10,7 +10,7 @@ Thank you to all the people who have already contributed to GitPoint! | [
Sammy Israwi](https://github.com/SammyIsra)
[💻](https://github.com/gitpoint/git-point/commits?author=SammyIsra "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3ASammyIsra "Bug reports") | [
Chao Ren](https://github.com/RogerAbyss)
[🐛](https://github.com/gitpoint/git-point/issues?q=author%3ARogerAbyss "Bug reports") [💻](https://github.com/gitpoint/git-point/commits?author=RogerAbyss "Code") | [
Harish Toshniwal](https://introwit.in)
[📖](https://github.com/gitpoint/git-point/commits?author=introwit "Documentation") | [
Ferran Negre](https://github.com/ferrannp)
[💻](https://github.com/gitpoint/git-point/commits?author=ferrannp "Code") | [
Ganesh Cauda Salim](https://github.com/caudaganesh)
[💻](https://github.com/gitpoint/git-point/commits?author=caudaganesh "Code") | [
Wanda Ichsanul Isra](https://www.linkedin.com/in/wlisrausr)
[💻](https://github.com/gitpoint/git-point/commits?author=wlisrausr "Code") | | [
Cameron Samuels](http://cameronsamuels.com)
[📖](https://github.com/gitpoint/git-point/commits?author=CameronSamuels "Documentation") | [
Mehdi Achour](https://machour.idk.tn/)
[🐛](https://github.com/gitpoint/git-point/issues?q=author%3Amachour "Bug reports") [💻](https://github.com/gitpoint/git-point/commits?author=machour "Code") [🌍](#translation-machour "Translation") | [
Reyhan Sofian](https://www.reyhan.tech/)
[💻](https://github.com/gitpoint/git-point/commits?author=reyhansofian "Code") | [
Adrian Hartanto](https://github.com/adrianhartanto0)
[💻](https://github.com/gitpoint/git-point/commits?author=adrianhartanto0 "Code") | [
Blake Y. Gong](https://github.com/blakegong)
[💻](https://github.com/gitpoint/git-point/commits?author=blakegong "Code") | [
Xianming Zhong](https://github.com/chinesedfan)
[💻](https://github.com/gitpoint/git-point/commits?author=chinesedfan "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Achinesedfan "Bug reports") | | [
Arthur Denner](https://github.com/arthurdenner)
[🌍](#translation-arthurdenner "Translation") | [
Florian Taut](https://taut-fl.de)
[💻](https://github.com/gitpoint/git-point/commits?author=FlorianTaut "Code") | [
Avare Kodcu](http://www.avarekodcu.com/iletisim)
[🌍](#translation-abdurrahmanekr "Translation") | [
Anas Khan](http://anask.xyz)
[🌍](#translation-anaskhan96 "Translation") | [
Nelson Henrique](https://github.com/nersoh)
[💻](https://github.com/gitpoint/git-point/commits?author=nersoh "Code") | [
Charles Kenney](http://charleskenney.com)
[💻](https://github.com/gitpoint/git-point/commits?author=Charliekenney23 "Code") | -| [
Vitaliy Kanev](https://github.com/vitalkanev)
[📖](https://github.com/gitpoint/git-point/commits?author=vitalkanev "Documentation") | [
Peter Dave Hello](https://www.peterdavehello.org/)
[📖](https://github.com/gitpoint/git-point/commits?author=PeterDaveHello "Documentation") [🔧](#tool-PeterDaveHello "Tools") | [
Ernoff](https://github.com/Ernoff)
[💻](https://github.com/gitpoint/git-point/commits?author=Ernoff "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3AErnoff "Bug reports") | [
João Fonseca](https://github.com/Jpfonseca)
[🌍](#translation-Jpfonseca "Translation") | [
Arjun Curat](https://github.com/acurat)
[📖](https://github.com/gitpoint/git-point/commits?author=acurat "Documentation") | [
siderio2](https://github.com/siderio2)
[🌍](#translation-siderio2 "Translation") | -| [
Kodo Verkisto](https://github.com/kodisto)
[🌍](#translation-kodisto "Translation") | [
Sarah Vessels](http://sarahvessels.com/)
[📖](https://github.com/gitpoint/git-point/commits?author=cheshire137 "Documentation") | [
Thales Sousa](https://github.com/tminussi)
[🌍](#translation-tminussi "Translation") | [
Aseem Sood](https://github.com/asood123)
[📖](https://github.com/gitpoint/git-point/commits?author=asood123 "Documentation") | [
Eliott hauteclair](https://eliott.be)
[🌍](#translation-Eliottiosdevs "Translation") | [
Peter Blazejewicz](http://www.linkedin.com/in/peterblazejewicz)
[🌍](#translation-peterblazejewicz "Translation") | -| [
Eric Adamski](https://github.com/ericadamski)
[🐛](https://github.com/gitpoint/git-point/issues?q=author%3Aericadamski "Bug reports") | [
Jouderian Nobre Junior](https://github.com/jouderianjr)
[💻](https://github.com/gitpoint/git-point/commits?author=jouderianjr "Code") | +| [
Vitaliy Kanev](https://github.com/vitalkanev)
[📖](https://github.com/gitpoint/git-point/commits?author=vitalkanev "Documentation") | [
Peter Dave Hello](https://www.peterdavehello.org/)
[📖](https://github.com/gitpoint/git-point/commits?author=PeterDaveHello "Documentation") [🔧](#tool-PeterDaveHello "Tools") | [
Ernoff](https://github.com/Ernoff)
[💻](https://github.com/gitpoint/git-point/commits?author=Ernoff "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3AErnoff "Bug reports") | [
Matthew Brandly](http://words.brandly.me/about/)
[💻](https://github.com/gitpoint/git-point/commits?author=brandly "Code") | [
João Fonseca](https://github.com/Jpfonseca)
[🌍](#translation-Jpfonseca "Translation") | [
Arjun Curat](https://github.com/acurat)
[📖](https://github.com/gitpoint/git-point/commits?author=acurat "Documentation") | +| [
siderio2](https://github.com/siderio2)
[🌍](#translation-siderio2 "Translation") | [
Kodo Verkisto](https://github.com/kodisto)
[🌍](#translation-kodisto "Translation") | [
Sarah Vessels](http://sarahvessels.com/)
[📖](https://github.com/gitpoint/git-point/commits?author=cheshire137 "Documentation") | [
Thales Sousa](https://github.com/tminussi)
[🌍](#translation-tminussi "Translation") | [
Aseem Sood](https://github.com/asood123)
[📖](https://github.com/gitpoint/git-point/commits?author=asood123 "Documentation") | [
Eliott hauteclair](https://eliott.be)
[🌍](#translation-Eliottiosdevs "Translation") | +| [
Peter Blazejewicz](http://www.linkedin.com/in/peterblazejewicz)
[🌍](#translation-peterblazejewicz "Translation") | [
Eric Adamski](https://github.com/ericadamski)
[🐛](https://github.com/gitpoint/git-point/issues?q=author%3Aericadamski "Bug reports") | [
Jouderian Nobre Junior](https://github.com/jouderianjr)
[💻](https://github.com/gitpoint/git-point/commits?author=jouderianjr "Code") | [
Phi Dong](http://www.phidong.com)
| diff --git a/src/components/view-container.component.js b/src/components/view-container.component.js index 76c9e813c..36c229730 100644 --- a/src/components/view-container.component.js +++ b/src/components/view-container.component.js @@ -1,5 +1,6 @@ import React from 'react'; -import { StyleSheet, StatusBar, View } from 'react-native'; +import { StatusBar } from 'react-native'; +import styled from 'styled-components/native'; import { colors } from 'config'; @@ -8,23 +9,21 @@ type Props = { children?: React.Element<*>, }; -const styles = StyleSheet.create({ - viewContainer: { - flex: 1, - flexDirection: 'column', - justifyContent: 'flex-start', - alignItems: 'stretch', - backgroundColor: colors.white, - }, -}); +const Container = styled.View` + flex: 1; + flex-direction: column; + justify-content: flex-start; + align-items: stretch; + background-color: ${colors.white}; +`; export const ViewContainer = ({ barColor, children }: Props) => ( - + {children} - + ); ViewContainer.defaultProps = {