import React, { useState } from 'react' import './div-btn.scss' /** * Icon Button Component * @param {Object} props * @param {React.ReactNode} props.icon - Default icon (SVG or React component) * @param {React.ReactNode} props.iconHover - Hover icon (optional) * @param {React.ReactNode} props.iconPressed - Pressed icon (optional) * @param {React.ReactNode} props.iconDisabled - Disabled icon (optional) * @param {Function} props.onClick - Click handler function * @param {string} props.className - Additional CSS classes * @param {boolean} props.disabled - Disable button (default: false) * @param {string} props.title - Tooltip text * @param {boolean} props.rotateOnHover - Rotate icon on hover (default: false) * @param {number} props.rotateDegrees - Degrees to rotate on hover (default: 180) */ function DivBtn({ icon, iconHover, iconPressed, iconDisabled, onClick, className = '', disabled = false, title = '', rotateOnHover = false, rotateDegrees = 180 }) { const [isPressed, setIsPressed] = useState(false) const [isHovered, setIsHovered] = useState(false) const handleClick = (e) => { if (!disabled && onClick) { onClick(e) } } const handleMouseDown = () => { if (!disabled) { setIsPressed(true) } } const handleMouseUp = () => { setIsPressed(false) } const handleMouseEnter = () => { if (!disabled) { setIsHovered(true) } } const handleMouseLeave = () => { setIsHovered(false) setIsPressed(false) } return (