NotUsersList.tsx 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import React from 'react'
  2. import { Button, Icon, Input } from 'antd'
  3. const TextArea = Input.TextArea
  4. const styles = require('../Organization.less')
  5. interface INotUsersProps {
  6. category: string
  7. notUsers: string[]
  8. hideHandler: () => void
  9. }
  10. export class NotUsersList extends React.PureComponent<INotUsersProps, {}> {
  11. public render() {
  12. const { category, notUsers, hideHandler } = this.props
  13. const modalButton = (
  14. <Button
  15. key="submit"
  16. type="primary"
  17. onClick={hideHandler}
  18. >
  19. 确定
  20. </Button>
  21. )
  22. const notUsersText = notUsers.join(',\n')
  23. return (
  24. <div className={styles.notUsersWrapper}>
  25. <div className={styles.titleWrapper}>
  26. <div className={styles.icon}>
  27. <Icon type="user" />
  28. </div>
  29. <div className={styles.title}>
  30. {category}不存在的名单
  31. </div>
  32. </div>
  33. <div className={styles.body}>
  34. <TextArea
  35. autoSize={{ minRows: 3, maxRows: 5 }}
  36. value={notUsersText}
  37. />
  38. </div>
  39. <div className={styles.footer}>
  40. {modalButton}
  41. </div>
  42. </div>
  43. )
  44. }
  45. }
  46. export default NotUsersList