bigbuffet-rw/app/soapbox/components/load_more.tsx
marcin mikołajczak 95e037f8c0 TypeScript, React.FC
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2022-06-09 20:56:14 +02:00

24 lines
571 B
TypeScript

import React from 'react';
import { FormattedMessage } from 'react-intl';
import { Button } from 'soapbox/components/ui';
interface ILoadMore {
onClick: React.MouseEventHandler,
disabled?: boolean,
visible?: Boolean,
}
const LoadMore: React.FC<ILoadMore> = ({ onClick, disabled, visible = true }) => {
if (!visible) {
return null;
}
return (
<Button theme='primary' block disabled={disabled || !visible} onClick={onClick}>
<FormattedMessage id='status.load_more' defaultMessage='Load more' />
</Button>
);
};
export default LoadMore;