Port 6337e036f3bc5ece013d5b2536d7d16b1ec658e8 to glitch-soc Signed-off-by: Claire <claire.github-309c@sitedethib.com>
24 lines
597 B
TypeScript
24 lines
597 B
TypeScript
import { FormattedMessage } from 'react-intl';
|
|
|
|
export const SearchSection: React.FC<{
|
|
title: React.ReactNode;
|
|
onClickMore?: () => void;
|
|
children: React.ReactNode;
|
|
}> = ({ title, onClickMore, children }) => (
|
|
<div className='search-results__section'>
|
|
<div className='search-results__section__header'>
|
|
<h3>{title}</h3>
|
|
{onClickMore && (
|
|
<button onClick={onClickMore} type='button'>
|
|
<FormattedMessage
|
|
id='search_results.see_all'
|
|
defaultMessage='See all'
|
|
/>
|
|
</button>
|
|
)}
|
|
</div>
|
|
|
|
{children}
|
|
</div>
|
|
);
|