UNPKG

box-ui-elements

Version:
27 lines (21 loc) 704 B
// @flow import * as React from 'react'; import classNames from 'classnames'; import Button from '../button'; import IconClose from '../../icons/general/IconClose'; import { bdlGray65 } from '../../styles/variables'; import './CloseButton.scss'; type Props = { /** Custom class for the close button */ className?: string, /** onClick handler for the close button */ onClick?: Function, } const CloseButton = ({ className, onClick }: Props) => { return ( <Button className={classNames('bdl-CloseButton', className)} onClick={onClick} type="button"> <IconClose color={bdlGray65} height={18} width={18} /> </Button> ); }; export default CloseButton;