import React, { forwardRef } from 'react'; import Tooltip from 'components/Elements/Tooltip/Tooltip'; const Button = forwardRef( ( { icon, label, type, iconPlacement, onClick, active, disabled, tooltipTitle, tooltipKey }, ref, ) => { let className; switch (type) { case 'settings': className = 'btn-settings'; break; case 'secondary': className = 'btn-secondary'; break; case 'icon': className = 'btn-icon'; break; case 'navigation': className = 'btn-navigation'; break; case 'collection': className = 'btn-collection'; break; default: className = 'btn-default'; } if (iconPlacement === 'right') { className += ' flowReverse'; } if (active) { className += ` ${className}-active`; } const button = ( ); return type === 'icon' ? ( {button} ) : ( button ); }, ); export { Button as default, Button };