Commit b4725c90 authored by Marek Kotewicz's avatar Marek Kotewicz
Browse files

unifying styles accross all views

parent 64db01e3
'use strict'
import { ADD_ACCOUNT, SELECT_ACCOUNT, DELETE_ACCOUNT, SET_PIN, CONFIRM_PIN } from '../constants/AccountActions' import { ADD_ACCOUNT, SELECT_ACCOUNT, DELETE_ACCOUNT, SET_PIN, CONFIRM_PIN } from '../constants/AccountActions'
export function addAccount(account) { export function addAccount(account) {
......
'use strict'
import { NEW_SCANNED_TX, SIGNED_TX } from '../constants/TransactionActions' import { NEW_SCANNED_TX, SIGNED_TX } from '../constants/TransactionActions'
export function newScannedTx(data) { export function newScannedTx(data) {
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import React, { Component, PropTypes } from 'react' import React, { Component, PropTypes } from 'react'
import { StyleSheet, View, Text, Button } from 'react-native' import { StyleSheet, View, Text, Button } from 'react-native'
import AppStyles from '../styles'
export default class AccountDetails extends Component { export default class AccountDetails extends Component {
static propTypes = { static propTypes = {
...@@ -14,7 +15,7 @@ export default class AccountDetails extends Component { ...@@ -14,7 +15,7 @@ export default class AccountDetails extends Component {
render() { render() {
return ( return (
<View style={styles.view}> <View style={AppStyles.view}>
<Text style={styles.text}>Name</Text> <Text style={styles.text}>Name</Text>
<Text style={styles.props}>{this.props.account.name ? this.props.account.name : 'no name'}</Text> <Text style={styles.props}>{this.props.account.name ? this.props.account.name : 'no name'}</Text>
<Text style={styles.text}>Address</Text> <Text style={styles.text}>Address</Text>
...@@ -41,12 +42,6 @@ export default class AccountDetails extends Component { ...@@ -41,12 +42,6 @@ export default class AccountDetails extends Component {
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
view: {
flex: 1,
marginTop: 60,
marginBottom: 50,
padding: 20,
},
text: { text: {
marginBottom: 20, marginBottom: 20,
}, },
......
'use strict' 'use strict'
import React, { Component, PropTypes } from 'react' import React, { Component, PropTypes } from 'react'
import { Text, StyleSheet, ListView, RecyclerViewBackedScrollView, StatusBar } from 'react-native' import { Text, View, ListView, RecyclerViewBackedScrollView, StatusBar } from 'react-native'
import AccountsListRow from './AccountsListRow' import AccountsListRow from './AccountsListRow'
import AppStyles from '../styles'
export default class AccountsList extends Component { export default class AccountsList extends Component {
static propTypes = { static propTypes = {
...@@ -29,7 +30,7 @@ export default class AccountsList extends Component { ...@@ -29,7 +30,7 @@ export default class AccountsList extends Component {
render() { render() {
return ( return (
<ListView <ListView
style={styles.view} style={AppStyles.listView}
dataSource={this.state.dataSource} dataSource={this.state.dataSource}
renderRow={(rowData, sectionID: number, rowID: number, highlightRow) => { renderRow={(rowData, sectionID: number, rowID: number, highlightRow) => {
return ( return (
...@@ -51,12 +52,3 @@ export default class AccountsList extends Component { ...@@ -51,12 +52,3 @@ export default class AccountsList extends Component {
) )
} }
} }
const styles = StyleSheet.create({
view: {
flex: 1,
marginTop: 60,
marginBottom: 50,
},
})
'use strict'
import React, { Component, PropTypes } from 'react' import React, { Component, PropTypes } from 'react'
import { TouchableHighlight, StyleSheet, View, Text } from 'react-native' import { TouchableHighlight, StyleSheet, View, Text } from 'react-native'
...@@ -11,12 +13,16 @@ export default class AccountsListRow extends Component { ...@@ -11,12 +13,16 @@ export default class AccountsListRow extends Component {
render() { render() {
return ( return (
<TouchableHighlight style={styles.row} onPress={this.props.onPress} underlayColor='#0004'> <TouchableHighlight style={styles.row} onPress={this.props.onPress} underlayColor='#0004'>
<View style={{flexDirection: 'row'}}> <View style={{flexDirection: 'column'}}>
<View style={styles.square}/> <View style={{flexDirection: 'row'}}>
<View style={{flexDirection: 'column'}}> <View style={styles.square}/>
<Text style={styles.upperText} ellipsizeMode="middle" numberOfLines={1}>{this.props.upperText}</Text> <View style={{flexDirection: 'column'}}>
<Text style={styles.lowerText} ellipsizeMode="middle" numberOfLines={1}>{this.props.lowerText}</Text> <Text style={styles.upperText} ellipsizeMode="middle" numberOfLines={1}>{this.props.upperText}</Text>
<Text style={styles.lowerText} ellipsizeMode="middle" numberOfLines={1}>{this.props.lowerText}</Text>
</View>
</View> </View>
<View style={{height: 1, backgroundColor: '#ccc'}}/>
<View style={{height: 1, backgroundColor: '#ddd'}}/>
</View> </View>
</TouchableHighlight> </TouchableHighlight>
) )
...@@ -25,10 +31,7 @@ export default class AccountsListRow extends Component { ...@@ -25,10 +31,7 @@ export default class AccountsListRow extends Component {
const styles = StyleSheet.create({ const styles = StyleSheet.create({
row: { row: {
flexDirection: 'row',
backgroundColor: '#F8F8F8', backgroundColor: '#F8F8F8',
borderBottomWidth: 1,
borderColor: '#F0F0F0',
}, },
square: { square: {
height: 60, height: 60,
...@@ -40,10 +43,11 @@ const styles = StyleSheet.create({ ...@@ -40,10 +43,11 @@ const styles = StyleSheet.create({
marginTop: 20, marginTop: 20,
width: 200, width: 200,
fontSize: 16, fontSize: 16,
color: '#888',
}, },
lowerText: { lowerText: {
marginTop: 5, marginTop: 5,
color: '#ddd', color: '#aaa',
fontSize: 10, fontSize: 10,
} }
}) })
'use strict'
import React, { Component } from 'react' import React, { Component } from 'react'
import { View, Text, StyleSheet } from 'react-native' import { View, Text, StyleSheet } from 'react-native'
import { Provider, connect } from 'react-redux' import { Provider, connect } from 'react-redux'
......
'use strict'
import React, { Component, PropTypes } from 'react' import React, { Component, PropTypes } from 'react'
import { TextInput, StyleSheet } from 'react-native' import { TextInput, StyleSheet } from 'react-native'
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import React, { Component, PropTypes } from 'react' import React, { Component, PropTypes } from 'react'
import { Text, View, StyleSheet } from 'react-native' import { Text, View, StyleSheet } from 'react-native'
import QRCode from 'react-native-qrcode' import QRCode from 'react-native-qrcode'
import AppStyles from '../styles'
export default class QrView extends Component { export default class QrView extends Component {
static propTypes = { static propTypes = {
...@@ -11,7 +12,7 @@ export default class QrView extends Component { ...@@ -11,7 +12,7 @@ export default class QrView extends Component {
render() { render() {
return ( return (
<View style={styles.view}> <View style={AppStyles.view}>
<View style={styles.rectangleContainer}> <View style={styles.rectangleContainer}>
<QRCode <QRCode
value={this.props.text} value={this.props.text}
...@@ -26,11 +27,6 @@ export default class QrView extends Component { ...@@ -26,11 +27,6 @@ export default class QrView extends Component {
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
view: {
flex: 1,
marginTop: 60,
marginBottom: 50,
},
rectangleContainer: { rectangleContainer: {
flex: 1, flex: 1,
alignItems: 'center', alignItems: 'center',
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
import React, { Component, PropTypes } from 'react' import React, { Component, PropTypes } from 'react'
import { StyleSheet, View, StatusBar } from 'react-native' import { StyleSheet, View, StatusBar } from 'react-native'
import Camera from 'react-native-camera'; import Camera from 'react-native-camera';
import AppStyles from '../styles'
export default class Scanner extends Component { export default class Scanner extends Component {
static propTypes = { static propTypes = {
...@@ -11,10 +12,12 @@ export default class Scanner extends Component { ...@@ -11,10 +12,12 @@ export default class Scanner extends Component {
render() { render() {
return ( return (
<Camera onBarCodeRead={this.props.onBarCodeRead} style={styles.view}> <Camera onBarCodeRead={this.props.onBarCodeRead} style={AppStyles.view}>
<StatusBar barStyle='light-content'/> <StatusBar barStyle='light-content'/>
<View style={styles.rectangleContainer}> <View style={styles.rectangleContainer}>
<View style={styles.rectangle}/> <View style={styles.rectangle}>
<View style={styles.innerRectangle}/>
</View>
</View> </View>
</Camera> </Camera>
) )
...@@ -22,12 +25,6 @@ export default class Scanner extends Component { ...@@ -22,12 +25,6 @@ export default class Scanner extends Component {
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
view: {
flex: 1,
marginTop: 60,
marginBottom: 50,
},
rectangleContainer: { rectangleContainer: {
flex: 1, flex: 1,
alignItems: 'center', alignItems: 'center',
...@@ -36,10 +33,22 @@ const styles = StyleSheet.create({ ...@@ -36,10 +33,22 @@ const styles = StyleSheet.create({
}, },
rectangle: { rectangle: {
borderWidth: 2,
borderRadius: 25,
alignItems: 'center',
justifyContent: 'center',
height: 250, height: 250,
width: 250, width: 250,
borderColor: '#ccc',
backgroundColor: 'transparent',
},
innerRectangle: {
height: 248,
width: 248,
borderWidth: 2, borderWidth: 2,
borderColor: '#00FFFF', borderRadius: 25,
borderColor: '#ddd',
backgroundColor: 'transparent', backgroundColor: 'transparent',
}, },
}); });
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import React, { Component, PropTypes } from 'react' import React, { Component, PropTypes } from 'react'
import { StyleSheet, View, Text, TextInput, Button } from 'react-native' import { StyleSheet, View, Text, TextInput, Button } from 'react-native'
import AppStyles from '../styles'
export default class Send extends Component { export default class Send extends Component {
static propTypes = { static propTypes = {
...@@ -12,7 +13,7 @@ export default class Send extends Component { ...@@ -12,7 +13,7 @@ export default class Send extends Component {
render() { render() {
return ( return (
<View style={styles.view}> <View style={AppStyles.view}>
<Text style={styles.hint}>recipient address</Text> <Text style={styles.hint}>recipient address</Text>
<TextInput <TextInput
placeholder='the recipient address' placeholder='the recipient address'
...@@ -58,12 +59,6 @@ export default class Send extends Component { ...@@ -58,12 +59,6 @@ export default class Send extends Component {
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
view: {
flex: 1,
marginTop: 60,
marginBottom: 50,
padding: 20,
},
hint: { hint: {
marginBottom: 20, marginBottom: 20,
}, },
......
'use strict'
import React, { Component, PropTypes } from 'react' import React, { Component, PropTypes } from 'react'
import { Text, StyleSheet } from 'react-native' import { Text, StyleSheet } from 'react-native'
...@@ -19,7 +21,7 @@ const styles = StyleSheet.create({ ...@@ -19,7 +21,7 @@ const styles = StyleSheet.create({
}, },
selected: { selected: {
fontWeight: 'bold', fontWeight: 'bold',
color: 'green', color: '#ddd',
} }
}) })
'use strict'
export const ADD_ACCOUNT = 'ACCOUNT_ACTION_ADD_ACCOUNT' export const ADD_ACCOUNT = 'ACCOUNT_ACTION_ADD_ACCOUNT'
export const SELECT_ACCOUNT = 'ACCOUNT_ACTION_SELECT_ACCOUNT' export const SELECT_ACCOUNT = 'ACCOUNT_ACTION_SELECT_ACCOUNT'
export const DELETE_ACCOUNT = 'ACCOUNT_ACTION_DELETE_ACCOUNT' export const DELETE_ACCOUNT = 'ACCOUNT_ACTION_DELETE_ACCOUNT'
......
'use strict'
export const NEW_SCANNED_TX = 'TRANSACTION_ACTION_NEW_SCANNED_TX' export const NEW_SCANNED_TX = 'TRANSACTION_ACTION_NEW_SCANNED_TX'
export const SIGNED_TX = 'TRANSACTION_ACTION_SIGNED_TX' export const SIGNED_TX = 'TRANSACTION_ACTION_SIGNED_TX'
'use strict'
import React from 'react' import React from 'react'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { Actions } from 'react-native-router-flux' import { Actions } from 'react-native-router-flux'
......
'use strict'
import React from 'react' import React from 'react'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { Actions } from 'react-native-router-flux' import { Actions } from 'react-native-router-flux'
......
'use strict'
import React, { Component } from 'react' import React, { Component } from 'react'
import { View, Text, TextInput, Button, StyleSheet } from 'react-native' import { View, Text, TextInput, Button, StyleSheet } from 'react-native'
import { connect } from 'react-redux' import { connect } from 'react-redux'
...@@ -7,6 +9,7 @@ import NewAccountInput from '../components/NewAccountInput' ...@@ -7,6 +9,7 @@ import NewAccountInput from '../components/NewAccountInput'
import { words } from '../util/random' import { words } from '../util/random'
import { brainWalletAddress } from '../util/crypto' import { brainWalletAddress } from '../util/crypto'
import { selectAccount } from '../actions/accounts' import { selectAccount } from '../actions/accounts'
import AppStyles from '../styles'
const mapDispatchToProps = (dispatch) => { const mapDispatchToProps = (dispatch) => {
return { return {
...@@ -43,7 +46,7 @@ export class NewAccount extends Component { ...@@ -43,7 +46,7 @@ export class NewAccount extends Component {
render() { render() {
var self = this; var self = this;
return ( return (
<View style={styles.view}> <View style={AppStyles.view}>
<Text style={styles.hint}>name</Text> <Text style={styles.hint}>name</Text>
<TextInput <TextInput
placeholder='My Account' placeholder='My Account'
...@@ -85,12 +88,6 @@ export class NewAccount extends Component { ...@@ -85,12 +88,6 @@ export class NewAccount extends Component {
} }
const styles = StyleSheet.create({ const styles = StyleSheet.create({
view: {
flex: 1,
marginTop: 60,
marginBottom: 50,
padding: 20
},
hint: { hint: {
marginBottom: 20, marginBottom: 20,
}, },
......
'use strict'
import React from 'react' import React from 'react'
import { Alert } from 'react-native' import { Alert } from 'react-native'
import { connect } from 'react-redux' import { connect } from 'react-redux'
......
'use strict'
import React, { Component } from 'react' import React, { Component } from 'react'
import { Vibration } from 'react-native' import { Vibration } from 'react-native'
import { connect } from 'react-redux' import { connect } from 'react-redux'
......
'use strict'
import React from 'react' import React from 'react'
import { connect } from 'react-redux' import { connect } from 'react-redux'
import { Actions } from 'react-native-router-flux' import { Actions } from 'react-native-router-flux'
......
'use strict'
import { ADD_ACCOUNT, SELECT_ACCOUNT, DELETE_ACCOUNT, SET_PIN } from '../constants/AccountActions' import { ADD_ACCOUNT, SELECT_ACCOUNT, DELETE_ACCOUNT, SET_PIN } from '../constants/AccountActions'
const initialAccounts = { const initialAccounts = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment