-
-
Save sendbird-community/cb8b92c4538cdfbbbdc9a09f57109d0f to your computer and use it in GitHub Desktop.
How to implement the ChannelSettings module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ChannelSettings from '@sendbird/uikit-react/ChannelSettings'; | |
import { ChannelSettingsProvider, useChannelSettingsContext } from '@sendbird/uikit-react/ChannelSettings/context'; | |
const MyComponent = () => { | |
const channelSettingsState = useChannelSettingsContext(); | |
return ( | |
...render custom component | |
); | |
}; | |
<ChannelSettingsProvider> | |
<MyComponent /> | |
<ChannelSettingsProvider/> | |
const LeaveChannelButton = () => { | |
const channelSettingsState = useChannelSettingsContext(); | |
return ( | |
...render custom component | |
); | |
}; | |
<ChannelSettings | |
renderLeaveChannel={LeaveChannelButton} | |
/> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment