// @flow
import React from 'react';
import styled from 'styled-components';

export type Props = {
  /** String to display in the tag */
  +children: string,
};

const TagWrapper = styled.div`
  display: flex;
  margin-right: .3125rem;
  padding: .125rem .625rem;
  margin-bottom: .625rem;
`;

const TagInner = styled.div`
  text-align: center;
  transition: border-color 0.3s;
  padding: 1rem 1.6rem;
  color: #333;
  font-size: 1.6rem;
  font-weight: 200;
  font-size: 1.5rem;
  text-decoration: none;
  border-radius: 2rem;
  border: 1px solid #969696;
`;

/**
 * Some form of tag
 */
const Tag = ({
  children,
}: Props) => (
  <TagWrapper>
    <TagInner>
      {children}
    </TagInner>
  </TagWrapper>
);

export default Tag;
