Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
thalia
ThaliApp
Commits
16b368e6
Commit
16b368e6
authored
May 27, 2017
by
Sébastiaan Versteeg
Browse files
Add gradient to MemberView
parent
6d845eac
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/components/MemberView.js
View file @
16b368e6
import
React
from
'
react
'
;
import
{
Image
,
Text
,
ViewPropTypes
,
StyleSheet
}
from
'
react-native
'
;
import
LinearGradient
from
'
react-native-linear-gradient
'
;
import
{
connect
}
from
'
react-redux
'
;
import
styles
from
'
./style/memberView
'
;
import
SquareView
from
'
./SquareView
'
;
const
MemberView
=
props
=>
(
<
SquareView
style
=
{
props
.
style
}
>
<
Image
style
=
{
styles
.
image
}
source
=
{{
uri
:
props
.
member
.
photo
}}
/
>
<
Text
style
=
{
styles
.
nameText
}
>
{
props
.
member
.
name
}
<
/Text
>
<
Image
style
=
{
styles
.
image
}
source
=
{{
uri
:
props
.
member
.
photo
}}
>
<
LinearGradient
colors
=
{[
'
#55000000
'
,
'
#000000
'
]}
style
=
{
styles
.
overlayGradient
}
/
>
<
Text
style
=
{
styles
.
nameText
}
>
{
props
.
member
.
name
}
<
/Text
>
<
/Image
>
<
/SquareView
>
);
...
...
app/components/style/memberView.js
View file @
16b368e6
...
...
@@ -13,6 +13,14 @@ const styles = StyleSheet.create({
image
:
{
flex
:
1
,
},
overlayGradient
:
{
position
:
'
absolute
'
,
top
:
'
50%
'
,
bottom
:
0
,
left
:
0
,
right
:
0
,
opacity
:
0.6
,
},
});
export
default
styles
;
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment