return ( {renderedPages.map(page => ( <Button key={page} onClick={() => onPageChange(page)} content={page} style={currentPage === page?{backgroundColor:"#cccccc"}:{}} /> ))} )