UNPKG

@itwin/core-react

Version:

A react component library of iTwin.js UI general purpose components

29 lines 1.62 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Bentley Systems, Incorporated. All rights reserved. * See LICENSE.md in the project root for license terms and full copyright notice. *--------------------------------------------------------------------------------------------*/ /** @packageDocumentation * @module Inputs */ import "./IconInput.scss"; import classnames from "classnames"; import * as React from "react"; import { Input } from "../Input.js"; // NEEDSWORK - for nativeKeyHandler /** Input component with icon to the left of the input field * @public */ // eslint-disable-next-line @typescript-eslint/no-deprecated const ForwardRefIconInput = React.forwardRef(function ForwardRefIconInput(props, ref) { const { className, icon, containerClassName, size, ...otherProps } = props; // NEEDSWORK: still using core-react Input component because of `nativeKeyHandler` prop return (React.createElement("div", { className: classnames("core-iconInput-container", containerClassName) }, React.createElement(Input, { ref: ref, className: classnames("core-input", className), ...otherProps }), React.createElement("div", { className: "core-iconInput-icon" }, icon))); }); /** Input component with icon to the left of the input field * @public * @deprecated in 4.12.0. Use {@link https://itwinui.bentley.com/docs/inputwithdecorations iTwinUI input decorations} instead. */ // eslint-disable-next-line @typescript-eslint/no-deprecated export const IconInput = ForwardRefIconInput; //# sourceMappingURL=IconInput.js.map