Guest User

Untitled

a guest
Jul 23rd, 2018
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.15 KB | None | 0 0
  1. import * as React from 'react';
  2. import { View, TouchableOpacity } from 'react-native';
  3. import styled from 'styled-components';
  4. import { Link } from 'react-router-native';
  5.  
  6.  
  7. const Title = styled.Text`
  8. font-size: 20px;
  9. color: #130f25;
  10. margin-bottom: 6px;
  11. `;
  12.  
  13. const Description = styled.Text`
  14. font-size: 14px;
  15. color: #ceceda;
  16. `;
  17.  
  18. const Wrapper = styled.View`
  19. display: flex;
  20. flex-direction: row;
  21. align-items: center;
  22. border-radius: 8px;
  23. border: 1px solid rgba(221, 221, 229, 0.25);
  24. padding-top: 10px;
  25. padding-right: 15px;
  26. padding-bottom: 10px;
  27. padding-left: 15px;
  28. `;
  29.  
  30. const BoxShadow = styled.View`
  31. shadow-color: #000000;
  32. shadow-offset: { width: 0, height: 2 };
  33. shadow-opacity: 0.8;
  34. shadow-radius: 2;
  35. `;
  36.  
  37.  
  38. export const Task = (props) => {
  39. return (
  40. <BoxShadow>
  41. <TouchableOpacity style={ props.style }>
  42. <Link to={ `/task/${props.id}` }>
  43. <Wrapper>
  44. <View>
  45. <Title>{ props.title }</Title>
  46. <Description>At least 6 hours</Description>
  47. </View>
  48. </Wrapper>
  49. </Link>
  50. </TouchableOpacity>
  51. </BoxShadow>
  52. );
  53. };
  54.  
  55. Task.defaultProps = {
  56. theme: 'default',
  57. };
Add Comment
Please, Sign In to add comment