@massds/mayflower-react
Version:
React versions of Mayflower design system UI components
48 lines (47 loc) • 1.86 kB
TypeScript
/**
* HeaderSearch module.
* @module @massds/mayflower-react/HeaderSearch
* @requires module:@massds/mayflower-assets/scss/01-atoms/button-with-icon
* @requires module:@massds/mayflower-assets/scss/01-atoms/button-search
* @requires module:@massds/mayflower-assets/scss/01-atoms/input-typeahead
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-icons
* @requires module:@massds/mayflower-assets/scss/01-atoms/svg-loc-icons
*/
import React from 'react';
import { ButtonWithIconProps } from '../ButtonWithIcon';
import { TypeAheadDropdownProps } from '../TypeAheadDropdown';
export interface HeaderSearchProps {
/** The ID for the input */
id?: string;
/** The label text for the input */
label?: string;
/** The placeholder text for the input */
placeholder?: string;
/** The Search button */
buttonSearch?: ButtonWithIconProps;
/** Custom submit function */
onSubmit?(...args: unknown[]): unknown;
/** Custom change function for the text input */
onChange?(...args: unknown[]): unknown;
/** Default input text value */
defaultText?: string;
/** Render suggestions as passable element */
suggestions?: React.ReactElement;
/** @molecules/TypeAheadDropdown */
orgDropdown?: TypeAheadDropdownProps;
/** postInputFilter passable component */
postInputFilter?: React.ReactElement;
/** A ref object as created by React.createRef(). Will be applied to the input element. */
inputRef?: ((...args: unknown[]) => unknown) | {
current?: object;
};
/** Autocomplete input attribute value */
autoComplete?: string;
}
declare class HeaderSearch extends React.Component<HeaderSearchProps> {
constructor(props: any);
handleChange: (event: any) => void;
handleSubmit: (event: any) => void;
render(): any;
}
export default HeaderSearch;