import React from 'react'
import PropTypes from 'prop-types'
import { Button } from 'src'
import BlankSlateStyled from './blankslate.styled'
const BlankSlate = ({
visible,
img,
title,
buttonIcon,
buttonType,
buttonTitle,
buttonClick,
orientation,
children
}) => (
<BlankSlateStyled orientation={orientation} visible={visible}>
<img src={img} className='blankslate-img' />
<div className='blankslate-label-container'>
<h2>{title}</h2>
<p>{children}</p>
<Button width='223px' type={buttonType} icon={buttonIcon} onClick={buttonClick} >{buttonTitle}</Button>
</div>
</BlankSlateStyled>
)
BlankSlate.propTypes = {
visible: PropTypes.bool.isRequired,
orientation: PropTypes.string.isRequired,
img: PropTypes.string,
title: PropTypes.string.isRequired,
buttonIcon: PropTypes.string,
buttonTitle: PropTypes.string,
buttonType: PropTypes.oneOf([
'primary',
'secondary',
'danger',
'default'
]),
buttonClick: PropTypes.func,
children: PropTypes.element
}
BlankSlate.defaultProps = {
orientation: 'ltr',
buttonType: 'primary',
buttonClick: () => { }
}
export { BlankSlate }
|