import s from "./PaginationButtons.module.scss" ; type Props = { action ? : ( offset : number ) => void ; offset ? : number ; loading ? : boolean ; } ; const PaginationButtons = ( { action , offset , loading } ) => offset ? ( < div className = { s . component } > { renderAction ( "MORE" , offset , action , loading ) } < /div>) : (<></ > ) ; export default PaginationButtons ; const renderAction = ( children , offset , action , loading ? ) => ( < button onClick = { ( ) => action && offset && action ( offset ) } className = { s . button } disabled = { loading } > { loading ? "Loading..." : children } < /button>);