import React from 'react'

const ToolbarButton = ({
    isActive,
    onClick,
    icon,
    title,
    disabled
}: {
    isActive?: boolean
    onClick: () => void
    icon?: React.ReactNode
    title?: string
    disabled?: boolean
}) => {
    return (
        <button
            onClick={onClick}
            className={`btn btn-sm btn-square ${isActive ? 'btn-neutral' : 'btn-ghost'}`}
            title={title}
            disabled={disabled}
        >
            {icon ?? icon}
        </button>
    )
}

export default ToolbarButton