@searchcraft/react-sdk / SearchcraftBaseSearchResults
SearchcraftBaseSearchResults(
props
,deprecatedLegacyContext
?):ReactNode
A component that renders a list of search results with customizable styles, layout, and link behavior.
Parameters
props
`SearchcraftBaseSearchResultsProps`
deprecatedLegacyContext?
any
Deprecated
See
Returns
ReactNode
Example
import React from 'react';
import { SearchcraftBaseSearchResults } from '@searchcraft/react-sdk';
import searchResultMappings from './searchResultMappings';
const MySearchComponent = () => {
return (
<SearchcraftBaseSearchResults
searchResultMappings={searchResultMappings}
resultImagePlacement="left"
buttonLabel="View More"
buttonTarget="_blank"
buttonRel="noopener"
containerTarget="_self"
containerRel="nofollow"
onNoResults={() => console.log("No search results found")}
/>
);
};
export default MySearchComponent;