Co-authored-by: Nick Taylor <nick@iamdeveloper.com> Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
22 lines
462 B
JavaScript
22 lines
462 B
JavaScript
// Load more button for item list
|
|
import { h } from 'preact';
|
|
import PropTypes from 'prop-types';
|
|
|
|
export const ItemListLoadMoreButton = ({ show, onClick }) => {
|
|
if (!show) {
|
|
return '';
|
|
}
|
|
|
|
return (
|
|
<div className="load-more-wrapper">
|
|
<button onClick={onClick} type="button">
|
|
Load More
|
|
</button>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
ItemListLoadMoreButton.propTypes = {
|
|
show: PropTypes.bool.isRequired,
|
|
onClick: PropTypes.func.isRequired,
|
|
};
|