mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-02-01 04:22:57 -05:00
24 lines
583 B
TypeScript
24 lines
583 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}>
|
|
<FormattedMessage
|
|
id='search_results.see_all'
|
|
defaultMessage='See all'
|
|
/>
|
|
</button>
|
|
)}
|
|
</div>
|
|
|
|
{children}
|
|
</div>
|
|
);
|