The properties object.
Optional
deprecatedLegacyContext: anyThe rendered EventSettingsModal component.
Optional
propUsed to declare the types of the props accepted by the component. These types will be checked during rendering and in development only.
We recommend using TypeScript instead of checking prop types at runtime.
Optional
contextOptional
defaultUsed to define default values for the props accepted by the component.
Optional
displayUsed in debugging messages. You might want to set it explicitly if you want to display a different name for debugging purposes.
EventSettingsModal component provides a modal interface for modifying event settings.
Component
Example
import React, { useState } from 'react'; import { EventSettingsModal } from 'mediasfu-reactjs';
const App = () => { const [modalVisible, setModalVisible] = useState(true); const handleCloseModal = () => setModalVisible(false);
const parameters = { audioSetting: "allow", videoSetting: "disallow", screenshareSetting: "approval", chatSetting: "disallow", };
return ( <EventSettingsModal isEventSettingsModalVisible={modalVisible} onEventSettingsClose={handleCloseModal} onModifyEventSettings={(options) => console.log("Settings modified", options)} audioSetting={parameters.audioSetting} videoSetting={parameters.videoSetting} screenshareSetting={parameters.screenshareSetting} chatSetting={parameters.chatSetting} updateAudioSetting={(setting) => console.log("Audio setting updated", setting)} updateVideoSetting={(setting) => console.log("Video setting updated", setting)} updateScreenshareSetting={(setting) => console.log("Screenshare setting updated", setting)} updateChatSetting={(setting) => console.log("Chat setting updated", setting)} updateIsSettingsModalVisible={(isVisible) => setModalVisible(isVisible)} position="topRight" backgroundColor="#83c0e9" /> ); };
export default App;