/*---------------------------------------------------------------------------------------------
 * 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
 */
import "./Icon.scss";
import classnames from "classnames";
import * as React from "react";
import { ToolbarButton } from "./Button";
/** Toolbar button which displays icon. Used in [[Toolbar]] component.
 * @note See basic button: [[ToolbarButton]]
 * @internal
 */
export class ToolbarIcon extends React.PureComponent {
    render() {
        const { className, small, ...props } = this.props;
        const buttonClassName = classnames("nz-toolbar-button-icon", small && "nz-toolbar-button-icon-small", className);
        return (React.createElement(ToolbarButton, { className: buttonClassName, small: small, ...props },
            React.createElement("div", { className: "nz-icon" }, this.props.icon),
            this.props.children));
    }
}
//# sourceMappingURL=Icon.js.map