Configuration options for the RequestsModal component.

RequestsModalOptions

Modal Control:

interface RequestsModalOptions {
    isRequestsModalVisible: boolean;
    onRequestClose: (() => void);
    requestCounter: number;
    onRequestFilterChange: ((text: string) => void);
    onRequestItemPress?: RespondToRequestsType;
    requestList: Request[];
    updateRequestList: ((newRequestList: Request[]) => void);
    roomName: string;
    socket: Socket<DefaultEventsMap, DefaultEventsMap>;
    renderRequestComponent?: FC<RenderRequestComponentOptions>;
    backgroundColor?: string;
    position?:
        | "center"
        | "topLeft"
        | "topRight"
        | "bottomLeft"
        | "bottomRight";
    parameters: RequestsModalParameters;
    style?: object;
    renderContent?: ((options: {
        defaultContent: Element;
        dimensions: {
            width: number;
            height: number;
        };
    }) => Element);
    renderContainer?: ((options: {
        defaultContainer: Element;
        dimensions: {
            width: number;
            height: number;
        };
    }) => ReactNode);
}

Properties

isRequestsModalVisible: boolean

Controls modal visibility

onRequestClose: (() => void)

Callback when modal is closed

Request Management:

requestCounter: number

Current count of pending requests (for badge display)

onRequestFilterChange: ((text: string) => void)

Handler for filter input changes

onRequestItemPress?: RespondToRequestsType

Handler for accept/reject actions (defaults to respondToRequests)

Session Context:

requestList: Request[]

Array of participant requests to display

updateRequestList: ((newRequestList: Request[]) => void)

Updates request list state

roomName: string

Room identifier for request processing

socket: Socket<DefaultEventsMap, DefaultEventsMap>

Socket.io instance for real-time request responses

State Parameters:

renderRequestComponent?: FC<RenderRequestComponentOptions>

Custom component for rendering each request item (defaults to RenderRequestComponent)

Advanced Render Overrides:

backgroundColor?: string

Modal background color

position?:
    | "center"
    | "topLeft"
    | "topRight"
    | "bottomLeft"
    | "bottomRight"

Modal position on screen

Additional modal parameters (filtered request list)

Customization:

style?: object

Additional custom styles for modal container

renderContent?: ((options: {
    defaultContent: Element;
    dimensions: {
        width: number;
        height: number;
    };
}) => Element)

Custom render function for modal content

renderContainer?: ((options: {
    defaultContainer: Element;
    dimensions: {
        width: number;
        height: number;
    };
}) => ReactNode)

Custom render function for modal container