import React from 'react';

/**
 * Toolbar component
 *
 * @param {object} props
 * @param {string} props.type Type of toolbar, eg. header or footer
 */
export function Toolbar(props) {
	switch (props.type) {
	case 'header':
		return (
			<header className="toolbar toolbar-header">
				{props.children}
			</header>
		);

	case 'footer':
		return (
			<footer className="toolbar toolbar-footer">
				{props.children}
			</footer>
		);

	default:
		return (
			<div className={`toolbar toolbar-${props.type}`}>
				{props.children}
			</div>
		);
	}
}

export default Toolbar;
