UNPKG

@hitachivantara/uikit-react-core

Version:
31 lines (30 loc) 985 B
import { HvAdornment } from "../FormElement/Adornment/Adornment.js"; import { HvIcon } from "../icons.js"; import { HvInput } from "../Input/Input.js"; import { useClasses } from "./SearchInput.styles.js"; import { useDefaultProps } from "@hitachivantara/uikit-react-utils"; import { forwardRef } from "react"; import { jsx } from "react/jsx-runtime"; //#region src/SearchInput/SearchInput.tsx /** * A Search Input allows users to enter and submit a search term. * * @extends HvInput */ var HvSearchInput = forwardRef(function HvSearchInput(props, ref) { const { classes: classesProp, ...others } = useDefaultProps("HvSearchInput", props); const { classes } = useClasses(classesProp); return /* @__PURE__ */ jsx(HvInput, { ref, type: "search", disableSearchButton: true, startAdornment: /* @__PURE__ */ jsx(HvAdornment, { icon: /* @__PURE__ */ jsx(HvIcon, { compact: true, name: "Search" }) }), classes, ...others }); }); //#endregion export { HvSearchInput };