king
2020-05-05 92108e6c93de657838bbd766a9eb4f27d85e1c2d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import React from 'react'
import { useDrag } from 'react-dnd'
import { Icon } from 'antd'
import './index.scss'
 
const SourceElement = ({content}) => {
  const [, drag] = useDrag({ item: content })
  return (
    <div ref={drag} className="print-source-item">
      {content.label}
      <Icon type={content.icon} />
    </div>
  )
}
export default SourceElement