Skip to content
Snippets Groups Projects
CloseButton.jsx 565 B
Newer Older
import React from 'react'
import styled from 'styled-components'
Audrey Hamelers's avatar
Audrey Hamelers committed
import { Icon, Action } from '@pubsweet/ui'

const Close = styled.p`
  display: flex;
  align-items: center;
Audrey Hamelers's avatar
Audrey Hamelers committed
  justify-content: flex-end;
  margin: 0;
  & + h2 {
    margin-top: 0;
  }
const CloseButton = ({ size = 4, ...props }) => (
Audrey Hamelers's avatar
Audrey Hamelers committed
  <Action {...props}>
    <Icon color="currentColor" size={size}>
Audrey Hamelers's avatar
Audrey Hamelers committed
      x
    </Icon>
  </Action>
const CloseModal = ({ className, ...props }) => (
  <Close className={className}>
    <CloseButton {...props} />
  </Close>
)

export { CloseModal, CloseButton }