All files / posts-table/components/PostsTable/components/PostItem/components ViewPost.jsx

75% Statements 3/4
100% Branches 0/0
0% Functions 0/1
75% Lines 3/4
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41            1x                           1x                             1x          
import React from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import { Text } from '@bufferapp/components';
import { curiousBlue } from '@bufferapp/components/style/color';
 
const ViewPostContainer = styled.a`
  display: inline-block;
  color: ${curiousBlue} !important;
  text-decoration: none;
  padding: 0.5rem;
  border: 1px solid ${curiousBlue};
  border-radius: 3px;
  width: auto;
 
  &:hover {
    text-decoration: none;
  }
`;
 
const ViewPost = ({ serviceLink }) => {
  return (
    <ViewPostContainer
      href={serviceLink}
      target="_blank"
      rel="noopener noreferrer"
    >
      <Text size="small" color="curiousBlue">
        <i className="bi-click" />
        View Post
      </Text>
    </ViewPostContainer>
  );
};
 
ViewPost.propTypes = {
  serviceLink: PropTypes.string.isRequired,
};
 
export default ViewPost;