pl-fe: allow accessing 'load more' button with hotkeys
Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
@ -1,8 +1,7 @@
|
||||
import { clsx } from 'clsx';
|
||||
import React from 'react';
|
||||
import { FormattedMessage } from 'react-intl';
|
||||
|
||||
import Button from 'pl-fe/components/ui/button';
|
||||
|
||||
interface ILoadMore {
|
||||
onClick: React.MouseEventHandler;
|
||||
disabled?: boolean;
|
||||
@ -16,9 +15,9 @@ const LoadMore: React.FC<ILoadMore> = ({ onClick, disabled, visible = true, clas
|
||||
}
|
||||
|
||||
return (
|
||||
<Button className={className} theme='primary' block disabled={disabled || !visible} onClick={onClick}>
|
||||
<button className={clsx('⁂-load-more', className)} disabled={disabled || !visible} onClick={onClick}>
|
||||
<FormattedMessage id='status.load_more' defaultMessage='Load more' />
|
||||
</Button>
|
||||
</button>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@ -71,7 +71,7 @@ const StatusList: React.FC<IStatusList> = ({
|
||||
|
||||
const handleMoveDown = (id: string, featured: boolean = false) => {
|
||||
const elementIndex = getCurrentStatusIndex(id, featured) + 1;
|
||||
selectChild(elementIndex, node, document.getElementById('status-list') || undefined);
|
||||
selectChild(elementIndex, node, document.getElementById('status-list') || undefined, scrollableContent.length);
|
||||
};
|
||||
|
||||
const handleLoadOlder = useCallback(debounce(() => {
|
||||
|
||||
Reference in New Issue
Block a user