import { Button, Popover, Checkbox, Flex } from 'antd' import PropTypes from 'prop-types' const ViewButton = ({ disabled = false, items = [], visibleState = {}, updateVisibleState = () => {}, ...buttonProps }) => { return ( { return ( {items.map((item) => ( { updateVisibleState(item.key, e.target.checked) }} > {item.label} ))} ) })()} placement='bottomLeft' arrow={false} > ) } ViewButton.propTypes = { disabled: PropTypes.bool, items: PropTypes.arrayOf( PropTypes.shape({ key: PropTypes.string.isRequired, label: PropTypes.string.isRequired }) ), visibleState: PropTypes.object, updateVisibleState: PropTypes.func } export default ViewButton