-
-
Notifications
You must be signed in to change notification settings - Fork 324
Add news screen to example #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
carmenmitru
wants to merge
6
commits into
galio-org:examples
Choose a base branch
from
carmenmitru:new-screens-2
base: examples
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 3 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bc890a9
add new screens
carmenmitru 2f1610e
add page Contacts and Ecommerce
carmenmitru 72a8546
cleaup
carmenmitru f932cc1
fix PR
carmenmitru b1ec4cd
cleaup dashboard screen
carmenmitru 49f2eea
fix PR for ecommerce page
carmenmitru File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import React from 'react'; | ||
import { Defs, LinearGradient, Stop } from 'react-native-svg'; | ||
|
||
export default class ChartGradient extends React.Component { | ||
constructor() { | ||
super(); | ||
} | ||
render() { | ||
return ( | ||
<Defs> | ||
<LinearGradient | ||
id={'gradient'} | ||
x1={'0%'} | ||
y1={'0%'} | ||
x2={'0%'} | ||
y2={'100%'} | ||
> | ||
<Stop | ||
offset={'0%'} | ||
stopColor={'rgb(134, 65, 244)'} | ||
stopOpacity={0.8} | ||
/> | ||
<Stop | ||
offset={'100%'} | ||
stopColor={'rgb(254, 70, 207)'} | ||
stopOpacity={0.2} | ||
/> | ||
</LinearGradient> | ||
</Defs> | ||
); | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,143 @@ | ||
import React from 'react'; | ||
import { StyleSheet, Platform, View, ScrollView } from 'react-native'; | ||
import Timeline from 'react-native-timeline-feed'; | ||
import { LinearGradient as Gradient } from 'expo'; | ||
|
||
import theme from '../theme'; | ||
|
||
// galio components | ||
import { Button, Block, NavBar } from 'galio-framework'; | ||
|
||
const LINE_COLOR = '#efefef'; | ||
const GRADIENT_PINK = ['#D442F8', '#B645F5', '#9B40F8']; | ||
const data = [ | ||
carmenmitru marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
id: '0', | ||
title: 'July 17, 2019', | ||
description: 'Get a 2% discount on your next order! Receive it', | ||
}, | ||
{ | ||
id: '1', | ||
title: 'May 24, 2019', | ||
description: 'We fixed latest issue with profile & activity screens', | ||
}, | ||
{ | ||
id: '2', | ||
title: 'February 17, 2019', | ||
description: 'Lucy’s Closet is now open until 8pm. Find you', | ||
}, | ||
{ | ||
id: '3', | ||
title: 'February 17, 2019', | ||
description: 'All your favourite books at your reach, Bookstore', | ||
}, | ||
{ | ||
id: '4', | ||
title: 'January 10, 2019', | ||
description: 'Be the first to know about discounts and offers', | ||
}, | ||
]; | ||
export default class Activity extends React.Component { | ||
render() { | ||
return ( | ||
<Block safe flex> | ||
<NavBar | ||
title="Activity" | ||
onLeftPress={() => this.props.navigation.openDrawer()} | ||
leftIconColor={theme.COLORS.MUTED} | ||
right={ | ||
<Button | ||
color="transparent" | ||
style={styles.settings} | ||
onPress={() => this.props.navigation.openDrawer()} | ||
></Button> | ||
} | ||
style={ | ||
Platform.OS === 'android' ? { marginTop: theme.SIZES.BASE } : null | ||
} | ||
/> | ||
<ScrollView style={{ flex: 1 }}> | ||
<Block style={styles.container}> | ||
<Timeline | ||
data={data} | ||
endWithCircle | ||
renderItem={this.renderItem} | ||
/> | ||
</Block> | ||
</ScrollView> | ||
</Block> | ||
); | ||
} | ||
|
||
renderItem = ({ item, index }) => { | ||
return ( | ||
<Timeline.Row keyExtractor={(item, index) => item.id}> | ||
<Timeline.VerticalSeparator> | ||
<Timeline.Circle color={theme.COLORS.NEUTRAL}> | ||
<Gradient | ||
start={[0.45, 0.45]} | ||
end={[0.8, 0.8]} | ||
colors={GRADIENT_PINK} | ||
style={[styles.circleGradient]} | ||
/> | ||
</Timeline.Circle> | ||
<Timeline.Line color={LINE_COLOR} /> | ||
</Timeline.VerticalSeparator> | ||
<Timeline.Event | ||
style={styles.event} | ||
|
||
> | ||
<View style={[styles.card, styles.titleAndTimeContainer]}> | ||
<Timeline.Title textStyle={styles.title}> | ||
{item.title} | ||
</Timeline.Title> | ||
|
||
<Timeline.Description textStyle={styles.description}> | ||
{item.description} | ||
</Timeline.Description> | ||
</View> | ||
</Timeline.Event> | ||
</Timeline.Row> | ||
); | ||
}; | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
paddingHorizontal: 14, | ||
justifyContent: 'flex-start', | ||
backgroundColor: theme.COLORS.WHITE, | ||
}, | ||
time: { | ||
color: theme.COLORS.BLACK, | ||
}, | ||
event: { | ||
paddingBottom: 20, | ||
}, | ||
title: { | ||
color: theme.COLORS.GREY, | ||
fontWeight: '400', | ||
}, | ||
description: { | ||
color: theme.COLORS.BLACK, | ||
}, | ||
card: { | ||
marginLeft: 5, | ||
padding: 14, | ||
backgroundColor: '#fff', | ||
borderRadius: 3, | ||
shadowOffset: { | ||
width: 0, | ||
height: 5, | ||
}, | ||
shadowRadius: 5, | ||
shadowOpacity: 0.24, | ||
}, | ||
circleGradient: { | ||
width: 16, | ||
height: 16, | ||
borderRadius: 8, | ||
alignItems: 'center', | ||
justifyContent: 'center', | ||
}, | ||
}); |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.