Function ShareEventModal

ShareEventModal component displays a modal that allows users to share event details, including the room name and an optional admin passcode, with other participants. This modal provides customizable options for positioning, appearance, and shared content.

import React, { useState } from 'react';
import { ShareEventModal } from 'mediasfu-reactnative';

function App() {
const [modalVisible, setModalVisible] = useState(true);

return (
<ShareEventModal
isShareEventModalVisible={modalVisible}
onShareEventClose={() => setModalVisible(false)}
roomName="Room123"
adminPasscode="Passcode456"
islevel="2"
eventType="conference"
backgroundColor="rgba(255, 255, 255, 0.8)"
shareButtons={true}
position="topRight"
localLink="https://example.com"
/>
);
}

export default App;

Properties

propTypes?: WeakValidationMap<ShareEventModalOptions>

Used 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.

contextTypes?: ValidationMap<any>

Lets you specify which legacy context is consumed by this component.

defaultProps?: Partial<ShareEventModalOptions>

Used to define default values for the props accepted by the component.

type Props = { name?: string }

const MyComponent: FC<Props> = (props) => {
return <div>{props.name}</div>
}

MyComponent.defaultProps = {
name: 'John Doe'
}
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'