PopinFixedHeader.jsx 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. import React from 'react'
  2. import classnames from 'classnames'
  3. import PropTypes from 'prop-types'
  4. const PopinFixedHeader = props => {
  5. return (
  6. <div className={classnames('wsFileGeneric__header', `${props.customClass}__header`)}>
  7. <div className={classnames('wsFileGeneric__header__icon', `${props.customClass}__header__icon`)}>
  8. <i className={props.icon} />
  9. </div>
  10. <div className={classnames('wsFileGeneric__header__title mr-auto', `${props.customClass}__header__title`)}>
  11. {props.name}
  12. </div>
  13. <div className={classnames('wsFileGeneric__header__edittitle', `${props.customClass}__header__changetitle`)}>
  14. <i className='fa fa-pencil' />
  15. </div>
  16. <div
  17. className={classnames('wsFileGeneric__header__close', `${props.customClass}__header__close`)}
  18. onClick={props.onClickCloseBtn}
  19. >
  20. <i className='fa fa-times' />
  21. </div>
  22. </div>
  23. )
  24. }
  25. export default PopinFixedHeader
  26. PopinFixedHeader.propTypes = {
  27. icon: PropTypes.string.isRequired,
  28. onClickCloseBtn: PropTypes.func.isRequired,
  29. customClass: PropTypes.string,
  30. name: PropTypes.string
  31. }
  32. PopinFixedHeader.defaultProps = {
  33. customClass: '',
  34. name: ''
  35. }