import React, { useRef } from 'react'; import PropType from 'prop-types'; const IconButton = ({ children, onClick, className }) => { const buttonRef = useRef(null); function handleClick() { buttonRef.current.blur(); if (typeof onClick === 'function') { onClick(); } } return ( ); }; IconButton.propTypes = { children: PropType.node, onClick: PropType.func, className: PropType.string, }; export default IconButton;