ResultList
The ResultList component renders the search results and pagination content.
Purpose
The ResultList component renders the result cards and pagination components.
Usage
import React from "react";
import { ResultList, ResultCard, ResultCardCallout, ResultPagination, ResultLoadMoreButton, ResultPaginationNextPrev } from "@usereactify/search";
export const Component: React.FC = () => {
return (
<ResultList
gridStyle={{}}
gridColumns={4}
gridGap={4}
pageSize={24}
renderLoading={() => <>Loading...</>}
renderNoResults={() => <>No results.</>}
renderError={() => <>Error loading results...</>}
renderResultCard={(props) => <ResultCard {...props} />}
renderResultCardCallout={(props) => <ResultCardCallout {...props} />}
renderPagination={(props) => <ResultPagination {...props} />}
renderLoadMoreButton={(props) => <ResultLoadMoreButton {...props} />}
renderPaginationNextPrev={(props) => <ResultPaginationNextPrev {...props} />}
/>
);
};Props
Last updated
Was this helpful?