import type { HTMLAttributes } from 'react' import React, { forwardRef } from 'react' import { Badge, Link, type LinkElementType, type LinkProps } from '../../' export interface SearchTopTermProps extends HTMLAttributes { /** * ID to find this component in testing tools (e.g.: cypress, testing library, and jest). */ testId?: string /** * Search term to be shown. */ value: string /** * Props for the `` rendered by this component. */ linkProps?: Partial> /** * Current term's position in a list of search terms. */ index: number } const SearchTopTerm = forwardRef( function SearchTopTerm( { testId = 'fs-top-search-term', value, linkProps, index }, ref ) { return (
  • {index + 1} {value}
  • ) } ) export default SearchTopTerm