Function Pagination

Pagination is a React component for navigating pages, with options for layout, style, and real-time updates.

This component supports navigating through pages while managing breakout rooms with socket events and optional alerts for restricted access. It allows custom styling, positioning, and direction of pagination controls.

import React from 'react';
import { Pagination } from 'mediasfu-reactjs';

function App() {
const parameters = {
mainRoomsLength: 2,
memberRoom: 1,
breakOutRoomStarted: true,
breakOutRoomEnded: false,
member: "John",
breakoutRooms: [[{ name: "John" }], [{ name: "Jane" }]],
hostNewRoom: 1,
roomName: "Room 1",
islevel: "1",
socket,
getUpdatedAllParams: () => parameters,
};

return (
<Pagination
totalPages={5}
currentUserPage={2}
handlePageChange={generatePageContent}
position="middle"
location="middle"
direction="horizontal"
buttonsContainerStyle={{ padding: 10 }}
activePageStyle={{ backgroundColor: "#2c678f" }}
inactivePageStyle={{ backgroundColor: "#ffffff" }}
backgroundColor="#ffffff"
paginationHeight={40}
showAspect={true}
parameters={parameters}
/>
);
}

export default App;

Properties

propTypes?: any

Ignored by React.

Only kept in types for backwards compatibility. Will be removed in a future major release.

displayName?: string

Used in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.


const MyComponent: FC = () => {
return <div>Hello!</div>
}

MyComponent.displayName = 'MyAwesomeComponent'