mirror of
https://github.com/glitch-soc/mastodon.git
synced 2024-11-25 17:44:14 -05:00
25 lines
548 B
TypeScript
25 lines
548 B
TypeScript
|
import { FormattedMessage } from 'react-intl';
|
||
|
|
||
|
interface Props {
|
||
|
onClick: (event: React.MouseEvent) => void;
|
||
|
disabled?: boolean;
|
||
|
visible?: boolean;
|
||
|
}
|
||
|
export const LoadMore: React.FC<Props> = ({
|
||
|
onClick,
|
||
|
disabled,
|
||
|
visible = true,
|
||
|
}) => {
|
||
|
return (
|
||
|
<button
|
||
|
type='button'
|
||
|
className='load-more'
|
||
|
disabled={disabled || !visible}
|
||
|
style={{ visibility: visible ? 'visible' : 'hidden' }}
|
||
|
onClick={onClick}
|
||
|
>
|
||
|
<FormattedMessage id='status.load_more' defaultMessage='Load more' />
|
||
|
</button>
|
||
|
);
|
||
|
};
|