-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
andrei
committed
Jul 14, 2020
1 parent
5ba5d79
commit 314c94f
Showing
1 changed file
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,37 @@ | ||
import React from 'react'; | ||
import LinearGradient from 'react-native-linear-gradient'; | ||
import styled from 'styled-components'; | ||
|
||
import { THEME } from '../utils/theme'; | ||
import { Text } from 'react-native'; | ||
|
||
const Billboard = ({ name, blend }) => ( | ||
<> | ||
<StyledText hue={340} len={name.length}> | ||
{name} | ||
</StyledText> | ||
|
||
<LinearGradient {...GRADIENT} colors={['transparent', THEME[blend].bg]} /> | ||
</> | ||
); | ||
|
||
const GRADIENT = { | ||
locations: [0.0, 1.0], | ||
end: { x: 0.0, y: 1.0 }, | ||
start: { x: 0.0, y: 0.0 }, | ||
style: { height: 130, top: 5 }, | ||
useViewFrame: false, | ||
}; | ||
|
||
const StyledText = styled(Text)` | ||
left: ${({ len }) => (len % len ? '20' : '-10')}%; | ||
opacity: 0.3; | ||
text-transform: uppercase; | ||
position: absolute; | ||
font-weight: 700; | ||
font-size: 110px; | ||
width: 1000px; | ||
color: white; | ||
`; | ||
|
||
export default Billboard; |