bigbuffet-rw/app/soapbox/components/load-more.tsx
marcin mikołajczak 2ce98055d8 Fix load more button height on account gallery page
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
2023-03-01 21:02:04 +01:00

25 lines
622 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
className?: string
}
const LoadMore: React.FC<ILoadMore> = ({ onClick, disabled, visible = true, className }) => {
if (!visible) {
return null;
}
return (
<Button className={className} theme='primary' block disabled={disabled || !visible} onClick={onClick}>
<FormattedMessage id='status.load_more' defaultMessage='Load more' />
</Button>
);
};
export default LoadMore;