Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

Adding new components from v0.9.0 #16

Merged
merged 7 commits into from
Jan 21, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
rebase onto master done;
  • Loading branch information
Monte Thakkar committed Jan 9, 2017
commit 9126c57e1debe0abeba245a328193190604419d5
15 changes: 9 additions & 6 deletions src/AppRootContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,17 @@ class AppRootContainer extends Component {
constructor () {
super()
this.state = {
toggled: false
isOpen: false
}
this.toggleSideMenu = this.toggleSideMenu.bind(this)
}

toggleSideMenu () {
this.setState({
toggled: !this.state.toggled
isOpen: !this.state.isOpen
})
}

render () {
const list = [
{
Expand Down Expand Up @@ -48,6 +50,7 @@ class AppRootContainer extends Component {
subtitle: 'CTO'
}
]

const MenuComponent = (
<View style={{flex: 1, backgroundColor: '#ededed', paddingTop: 50}}>
<List containerStyle={{marginBottom: 20}}>
Expand All @@ -66,12 +69,12 @@ class AppRootContainer extends Component {
</List>
</View>
)

return (
<SideMenu
toggledContainerStyle={{borderLeftWidth: 1, borderLeftColor: '#ededed'}}
toggled={this.state.toggled}
MenuComponent={MenuComponent}>
<App toggleSideMenu={this.toggleSideMenu} />
isOpen={this.state.isOpen}
menu={MenuComponent}>
<App toggleSideMenu={this.toggleSideMenu.bind(this)} />
</SideMenu>
)
}
Expand Down
21 changes: 16 additions & 5 deletions src/about/About.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import {
Card,
SocialIcon,
Divider,
ButtonGroup
ButtonGroup,
Slider
} from 'react-native-elements'

import * as RNElements from 'react-native-elements'
Expand Down Expand Up @@ -136,7 +137,7 @@ class About extends Component {
color='#009688'
name='sc-telegram'
type='evilicon'
onPress={() => console.log('hello')} />
onPress={() => console.log('hello')} />
<RNElements.Icon
color='#8BC34A'
name='social-apple'
Expand Down Expand Up @@ -165,7 +166,7 @@ class About extends Component {
raised
color='#00BCD4'
name='weekend'
onPress={() => console.log('hello')} />
onPress={() => console.log('hello')} />
<RNElements.Icon
raised
color='#CDDC39'
Expand Down Expand Up @@ -197,7 +198,7 @@ class About extends Component {
raised
color='#009688'
name='code'
onPress={() => console.log('hello')} />
onPress={() => console.log('hello')} />
<RNElements.Icon
reverse
raised
Expand Down Expand Up @@ -227,7 +228,7 @@ class About extends Component {
reverse
color='#00BCD4'
name='pets'
onPress={() => console.log('hello')} />
onPress={() => console.log('hello')} />
<RNElements.Icon
reverse
color='#CDDC39'
Expand Down Expand Up @@ -349,6 +350,16 @@ class About extends Component {
/>
</View>
</Card>
{/* <Card
containerStyle={{marginTop: 15, marginBottom: 15}}
title='SLIDERS'>
<View>
<Slider
value={this.state.value}
onValueChange={(value) => this.setState({value})} />
<Text>Value: {this.state.value}</Text>
</View>
</Card> */}
</View>
</ScrollView>
)
Expand Down
Binary file added src/images/rating.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 28 additions & 7 deletions src/more/More.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React, { Component } from 'react'
import { View, StyleSheet, ScrollView, ListView } from 'react-native'
import { View, Image, StyleSheet, ScrollView, ListView } from 'react-native'
import Icon from 'react-native-vector-icons/MaterialIcons'
let styles

Expand Down Expand Up @@ -126,7 +126,7 @@ class More extends Component {
dataSource={this.state.dataSource}
/>
</List>
<List containerStyle={{marginBottom: 20}}>
<List>
{
list2.map((l, i) => (
<ListItem
Expand All @@ -140,11 +140,19 @@ class More extends Component {
))
}
</List>
<ListItem
roundAvatar
title='Nader Dabit'
avatar={require('../images/avatar1.jpg')}
/>
<List>
<ListItem
roundAvatar
title='Limited supply! Its like digital gold!'
subtitle={
<View style={styles.subtitleView}>
<Image source={require('../images/rating.png')} style={styles.ratingImage}/>
<Text style={styles.ratingText}>5 months ago</Text>
</View>
}
avatar={require('../images/avatar1.jpg')}
/>
</List>
</ScrollView>
)
}
Expand All @@ -168,6 +176,19 @@ styles = StyleSheet.create({
alignItems: 'center',
padding: 40,
backgroundColor: '#69DDFF'
},
subtitleView: {
flexDirection: 'row',
paddingLeft: 10,
paddingTop: 5
},
ratingImage: {
height: 19.21,
width: 100
},
ratingText: {
paddingLeft: 10,
color: 'grey'
}
})

Expand Down
Loading