import React from 'react'
import PropTypes from 'prop-types'
import { Space, Tag } from 'antd'
import QuestionCircleIcon from '../../Icons/QuestionCircleIcon'
import PlusIcon from '../../Icons/PlusIcon'
import BinIcon from '../../Icons/BinIcon'
import EditIcon from '../../Icons/EditIcon'
const OperationDisplay = ({
operation,
showIcon = true,
showText = true,
showColor = true
}) => {
var tagText = 'False'
var tagIcon =
var tagColor = 'default'
switch (operation) {
case 'new':
tagText = 'New'
tagIcon =
tagColor = 'success'
break
case 'delete':
tagText = 'Delete'
tagIcon =
tagColor = 'error'
break
case 'edit':
tagText = 'Edit'
tagIcon =
tagColor = 'blue'
break
default:
break
}
return (
{showText ? tagText : null}
)
}
OperationDisplay.propTypes = {
operation: PropTypes.bool.isRequired,
showIcon: PropTypes.bool,
showText: PropTypes.bool,
showColor: PropTypes.bool
}
export default OperationDisplay