import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { IconButton, Icon, Tooltip } from '../'; const ToolbarButton = ({ type = 'tool', id, icon, label, commands, onInteraction, dropdownContent, // isActive: _isActive, bState = {}, // }) => { const { primaryToolId } = bState; const isActive = _isActive || (type === 'tool' && id === primaryToolId); const classes = { tool: isActive ? 'text-black' : 'text-common-bright hover:bg-primary-dark hover:text-primary-light', toggle: isActive ? 'text-[#348CFD]' : 'text-common-bright hover:bg-primary-dark hover:text-primary-light', action: isActive ? 'text-black' : 'text-common-bright hover:bg-primary-dark hover:text-primary-light', }; const bgClasses = { toggle: isActive && 'bg-transparent', }; const activeClass = isActive ? 'active' : ''; const shouldShowDropdown = !!isActive && !!dropdownContent; return (