Configuration options for the CoHostModal component.

CoHostModalOptions

Modal Control:

interface CoHostModalOptions {
    isCoHostModalVisible: boolean;
    currentCohost?: string;
    participants: Participant[];
    coHostResponsibility: CoHostResponsibility[];
    position?: string;
    backgroundColor?: string;
    roomName: string;
    showAlert?: ShowAlert;
    updateCoHostResponsibility: ((coHostResponsibility: CoHostResponsibility[]) => void);
    updateCoHost: ((coHost: string) => void);
    updateIsCoHostModalVisible: ((isCoHostModalVisible: boolean) => void);
    socket: Socket<DefaultEventsMap, DefaultEventsMap>;
    onCoHostClose: (() => void);
    onModifyEventSettings?: ((settings: ModifyCoHostSettingsOptions) => void);
    style?: object;
    renderContent?: ((options: {
        defaultContent: Element;
        dimensions: {
            width: number;
            height: number;
        };
    }) => Element);
    renderContainer?: ((options: {
        defaultContainer: Element;
        dimensions: {
            width: number;
            height: number;
        };
    }) => ReactNode);
}

Properties

isCoHostModalVisible: boolean

Controls modal visibility

currentCohost?: string

Name of currently assigned co-host

participants: Participant[]

List of event participants eligible for co-host assignment

coHostResponsibility: CoHostResponsibility[]

Array of co-host responsibility items with enable/disable status

position?: string

Modal position on screen

backgroundColor?: string

Modal background color

roomName: string

Room identifier for event

showAlert?: ShowAlert

Alert display function for user feedback

Customization:

updateCoHostResponsibility: ((coHostResponsibility: CoHostResponsibility[]) => void)

Updates co-host responsibility settings

updateCoHost: ((coHost: string) => void)

Sets new co-host by name

updateIsCoHostModalVisible: ((isCoHostModalVisible: boolean) => void)

Toggles modal visibility state

Settings Handler:

socket: Socket<DefaultEventsMap, DefaultEventsMap>

Socket.io instance for real-time co-host updates

onCoHostClose: (() => void)

Callback when modal is closed

Co-Host Management:

onModifyEventSettings?: ((settings: ModifyCoHostSettingsOptions) => void)

Custom handler for applying co-host settings (defaults to modifyCoHostSettings)

Session Context:

style?: object

Additional custom styles for modal container

Advanced Render Overrides:

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