Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import * as React from 'react';
- import { View, TouchableOpacity } from 'react-native';
- import styled from 'styled-components';
- import { Link } from 'react-router-native';
- const Title = styled.Text`
- font-size: 20px;
- color: #130f25;
- margin-bottom: 6px;
- `;
- const Description = styled.Text`
- font-size: 14px;
- color: #ceceda;
- `;
- const Wrapper = styled.View`
- display: flex;
- flex-direction: row;
- align-items: center;
- border-radius: 8px;
- border: 1px solid rgba(221, 221, 229, 0.25);
- padding-top: 10px;
- padding-right: 15px;
- padding-bottom: 10px;
- padding-left: 15px;
- `;
- const BoxShadow = styled.View`
- shadow-color: #000000;
- shadow-offset: { width: 0, height: 2 };
- shadow-opacity: 0.8;
- shadow-radius: 2;
- `;
- export const Task = (props) => {
- return (
- <BoxShadow>
- <TouchableOpacity style={ props.style }>
- <Link to={ `/task/${props.id}` }>
- <Wrapper>
- <View>
- <Title>{ props.title }</Title>
- <Description>At least 6 hours</Description>
- </View>
- </Wrapper>
- </Link>
- </TouchableOpacity>
- </BoxShadow>
- );
- };
- Task.defaultProps = {
- theme: 'default',
- };
Add Comment
Please, Sign In to add comment