UNPKG

@muvehealth/fixins

Version:

Component library for Muvehealth

40 lines (34 loc) 829 B
// @flow import React from 'react' import styled from 'react-emotion' import { color, position, top, right, bottom, left, themeGet, zIndex } from 'styled-system' import { ButtonBase } from '../../elements/Button' import Icons from '../../elements/Icons' type Props = { width?: number, height?: number, } const CloseButton = ({ ...styles }: Props) => ( // $FlowFixMe: Don't want to limit styled-system props <Button title="Close" {...styles} p={0}> <Icons type="X" height={styles.height} width={styles.width} /> </Button> ) CloseButton.defaultProps = { width: 18, height: 18, } const Button = styled(ButtonBase)( { border: 'none' }, props => ({ color: themeGet('colors.darkBlue', '#1DC1C8')(props), }), color, position, top, right, bottom, left, zIndex, ) export default CloseButton