diff --git a/ui/src/assets/tooltip-48.png b/ui/src/assets/tooltip-48.png new file mode 100644 index 0000000..94fe82a Binary files /dev/null and b/ui/src/assets/tooltip-48.png differ diff --git a/ui/src/components/Search/Search.tsx b/ui/src/components/Search/Search.tsx index 538f046..4c921ee 100644 --- a/ui/src/components/Search/Search.tsx +++ b/ui/src/components/Search/Search.tsx @@ -35,7 +35,13 @@ const fields: FormFieldProps[] = [ { value: "Withdrawn", label: "Withdrawn" }, ], }, - { name: "titleOfInvention", label: "Title Of Invention", type: "text" }, + { + name: "titleOfInvention", + label: "Title Of Invention", + type: "text", + tooltipText: + "Enabling the smart search will retrieve results that not only match the title of invention keyword, but are also semantically similar in meaning.", + }, { name: "filingDate", label: "Filing Date Range", @@ -194,6 +200,7 @@ export default function SearchComponent() { placeholder={field.label} // error={errors[field.name]} options={field.options} + tooltipText={field.tooltipText} /> ); return ( diff --git a/ui/src/components/elements/FormField.tsx b/ui/src/components/elements/FormField.tsx index a16690a..675ff53 100644 --- a/ui/src/components/elements/FormField.tsx +++ b/ui/src/components/elements/FormField.tsx @@ -1,5 +1,6 @@ import React from "react"; - +import { OverlayTrigger, Tooltip } from "react-bootstrap"; +import tooltipIcon from "../../assets/tooltip-48.png"; const FormField: React.FC = ({ label, name, @@ -11,15 +12,27 @@ const FormField: React.FC = ({ options = [], valueEnd, onChangeEnd, + tooltipText, }) => { const inputClass = `form-control ${error ? "is-invalid" : ""}`; return (
- {type === "select" ? (