import PropTypes from "prop-types";
import React from "react";
import classNames from "classnames";

var ToolbarItemContents = function ToolbarItemContents(props) {
  return React.createElement("div", {
    className: "flex flex-align--center editor__select-size__text"
  }, props.icon && React.createElement("svg", {
    className: "lego-icon push--right vertical-align--middle"
  }, React.createElement("use", {
    xlinkHref: props.icon
  })), React.createElement("div", {
    className: classNames({
      "line--tight": props.isDropdown
    })
  }, props.title && React.createElement("div", {
    className: "editor__select-size__value"
  }, props.title), React.createElement("span", null, props.label)), props.isDropdown && React.createElement("span", {
    className: "lego-arrow-inline--down push--left"
  }));
};

ToolbarItemContents.propTypes = {
  icon: PropTypes.string,
  isDropdown: PropTypes.bool,
  label: PropTypes.oneOfType([PropTypes.string.isRequired, PropTypes.node.isRequired]).isRequired,
  title: PropTypes.string
};
export default ToolbarItemContents;