"use strict";
/*---------------------------------------------------------------------------------------------
 * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
 * See LICENSE.md in the project root for license terms and full copyright notice.
 *--------------------------------------------------------------------------------------------*/
/** @packageDocumentation
 * @module Toolbar
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToolbarIcon = void 0;
require("./Icon.scss");
const classnames_1 = require("classnames");
const React = require("react");
const Button_1 = require("./Button");
/** Toolbar button which displays icon. Used in [[Toolbar]] component.
 * @note See basic button: [[ToolbarButton]]
 * @internal
 */
class ToolbarIcon extends React.PureComponent {
    render() {
        const { className, small, ...props } = this.props;
        const buttonClassName = (0, classnames_1.default)("nz-toolbar-button-icon", small && "nz-toolbar-button-icon-small", className);
        return (React.createElement(Button_1.ToolbarButton, { className: buttonClassName, small: small, ...props },
            React.createElement("div", { className: "nz-icon" }, this.props.icon),
            this.props.children));
    }
}
exports.ToolbarIcon = ToolbarIcon;
//# sourceMappingURL=Icon.js.map