import React from 'react'; import PropTypes from 'prop-types'; import classnames from 'classnames'; import { IconButton, Icon, Tooltip } from '../'; const ToolbarButton = ({ type, id, icon, label, commandName, commandOptions, onInteraction, dropdownContent, // isActive: _isActive, bState = {}, // }) => { const { primaryToolId, toggles, groups } = bState; const isActive = _isActive || (type === 'tool' && id === primaryToolId); const classes = { type: { primary: isActive ? 'text-black' : 'text-common-bright hover:bg-primary-dark hover:text-primary-light', secondary: isActive ? 'text-black' : 'text-white hover:bg-secondary-dark hover:text-white focus:bg-secondary-dark focus:text-white', }, }; const shouldShowDropdown = !!isActive && !!dropdownContent; return (