UNPKG

@eccenca/gui-elements

Version:

GUI elements based on other libraries, usable in React application, written in Typescript.

24 lines (23 loc) 928 B
import React from "react"; import { TestableComponent } from "../../components/interfaces"; import { TextFieldProps } from "./TextField"; export interface SearchFieldProps extends TestableComponent, Omit<TextFieldProps, "placeholder" | "fullWidth"> { /** * Placeholder text for search box. */ emptySearchInputMessage?: string; /** * Event handler to reset search input. * If set then `rightElement` is automatically set with an action button to trigger the handler. */ onClearanceHandler?: () => void; /** * Tooltip to show for the clear button. */ onClearanceText?: string; } /** * Special `TextField` element for search term inputs. */ export declare const SearchField: ({ className, emptySearchInputMessage, onClearanceHandler, onClearanceText, onChange, leftIcon, rightElement, ...otherProps }: SearchFieldProps) => React.JSX.Element; export default SearchField;