/* * Copyright (c) Jupyter Development Team. * Distributed under the terms of the Modified BSD License. */ import React from 'react'; import { LabIcon } from '../icon'; import { classes } from '../utils'; /** * InputGroup component properties */ export interface IInputGroupProps extends React.InputHTMLAttributes { /** * Pass a ref to the input element */ inputRef?: React.RefObject; /** * Right icon adornment */ rightIcon?: string | LabIcon; } /** * InputGroup component * * @param props Component properties * @returns Component */ export function InputGroup(props: IInputGroupProps): JSX.Element { const { className, inputRef, rightIcon, ...others } = props; return (
{rightIcon && ( {typeof rightIcon === 'string' ? ( ) : ( )} )}
); }