import * as React from 'react'; import * as PropTypes from 'prop-types'; import { ButtonProps } from '../Button/Button'; import Icon from '../Icon'; import VisuallyHidden from '../VisuallyHidden'; import { Omit } from '../types'; import { AlertClose as _AlertClose } from './styled'; export type LocalAlertCloseProps = { isAbsolute?: boolean; onClickClose?: ButtonProps['onClick']; }; export type AlertCloseProps = Omit & LocalAlertCloseProps; export const AlertClose: React.FunctionComponent = ({ onClickClose, ...props }) => ( <_AlertClose kind="link" onClick={onClickClose} {...props}> Close ); export const alertClosePropTypes = { isAbsolute: PropTypes.bool, onClickClose: PropTypes.func }; AlertClose.propTypes = alertClosePropTypes; export const alertCloseDefaultProps = { isAbsolute: false, onClickClose: undefined }; AlertClose.defaultProps = alertCloseDefaultProps; const C: React.FunctionComponent = AlertClose; export default C;