-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(react-native): UI Component - CallTopView, CallControls (#934)
- Loading branch information
Showing
14 changed files
with
133 additions
and
22 deletions.
There are no files selected for viewing
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
63 changes: 63 additions & 0 deletions
63
...-native-sdk/docusaurus/docs/reactnative/04-ui-components/call/call-top-view.mdx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
--- | ||
id: call-top-view | ||
title: CallTopView | ||
--- | ||
|
||
import ParticipantsInfoBadge from '../../common-content/ui-components/call/call-content/participants-info-badge.mdx'; | ||
import OnBackPressed from '../../common-content/ui-components/call/call-content/on-back-pressed.mdx'; | ||
import OnParticipantInfoPress from '../../common-content/ui-components/call/call-content/on-participant-info-press.mdx'; | ||
import CallTopViewTitle from '../../common-content/ui-components/call/call-top-view/title.mdx'; | ||
import CallTopViewStyle from '../../common-content/ui-components/call/call-top-view/style.mdx'; | ||
|
||
The `CallTopView` represents the header component that gives the user more information when in a call, while adding a few actions they can trigger while the call is active. The header is useful for showing the call name or title, as well as the state, such as if the user is fully connected to the call or not. | ||
It has a back button by default and a participant info badge. | ||
|
||
![Preview of the CallTopView component](../../assets/04-ui-components/call/call-top-view/call-top-view.png) | ||
|
||
## General Usage | ||
|
||
To use the component, you can simple use it as: | ||
|
||
```tsx {12} | ||
import { | ||
Call, | ||
CallTopView, | ||
StreamCall, | ||
} from '@stream-io/video-react-native-sdk'; | ||
|
||
const VideoCallUI = () => { | ||
let call: Call; | ||
|
||
return ( | ||
<StreamCall call={call}> | ||
<CallTopView /> | ||
</StreamCall> | ||
); | ||
}; | ||
``` | ||
|
||
## Props | ||
|
||
### `onBackPressed` | ||
|
||
<OnBackPressed /> | ||
|
||
### `onParticipantInfoPress` | ||
|
||
<OnParticipantInfoPress /> | ||
|
||
### `title` | ||
|
||
<CallTopViewTitle /> | ||
|
||
### `style` | ||
|
||
<CallTopViewStyle /> | ||
|
||
### `ParticipantsInfoBadge` | ||
|
||
<ParticipantsInfoBadge /> | ||
|
||
## Customization | ||
|
||
You can create your own custom `CallTopView` using the [Call Top View UI Cookbook guide](../../../ui-cookbook/replacing-call-top-view/). |
8 changes: 8 additions & 0 deletions
8
...e-sdk/docusaurus/docs/reactnative/05-ui-cookbook/04-replacing-call-top-view.mdx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Call Top View | ||
description: A guide on how to create Call Top View | ||
--- | ||
|
||
:::info | ||
This will be added soon. | ||
::: |
Binary file removed
BIN
-34.7 KB
...ative-sdk/docusaurus/docs/reactnative/assets/04-ui-components/call-controls.png
Binary file not shown.
Binary file added
BIN
+21.7 KB
...s/docs/reactnative/assets/04-ui-components/call/call-controls/call-controls.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.54 KB
...s/docs/reactnative/assets/04-ui-components/call/call-top-view/call-top-view.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions
5
.../reactnative/common-content/ui-components/call/call-content/on-back-pressed.mdx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Handler to be called when the back button is pressed in the CallTopView. | ||
|
||
| Type | | ||
| --------------------------- | | ||
| `() => void` \| `undefined` | |
5 changes: 5 additions & 0 deletions
5
...ative/common-content/ui-components/call/call-content/on-hangup-call-handler.mdx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Handler to be called when the call is left using the [HangupCallButton](#hangupcallbutton). | ||
|
||
| Type | | ||
| --------------------------- | | ||
| `() => void` \| `undefined` | |
5 changes: 5 additions & 0 deletions
5
...ve/common-content/ui-components/call/call-content/on-participant-info-press.mdx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Handler to be called when the Participant icon is pressed in the CallTopView. | ||
|
||
| Type | | ||
| --------------------------- | | ||
| `() => void` \| `undefined` | |
5 changes: 5 additions & 0 deletions
5
...tive/common-content/ui-components/call/call-content/participants-info-badge.mdx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Component to customize the ParticipantInfoBadge of the CallTopView. | ||
|
||
| Type | Default Value | | ||
| ----------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | ||
| `ComponentType`\| `undefined` | [`ParticipantsInfoBadge`](https://github.com/GetStream/stream-video-js/blob/main/packages/react-native-sdk/src/components/Call/CallTopView/ParticipantsInfoBadge.tsx) | |
5 changes: 5 additions & 0 deletions
5
...urus/docs/reactnative/common-content/ui-components/call/call-top-view/style.mdx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Style to override the container of the `CallTopView`. | ||
|
||
| Type | | ||
| ---------------------------------------------------------- | | ||
| [ViewStyle](https://reactnative.dev/docs/view-style-props) | |
5 changes: 5 additions & 0 deletions
5
...urus/docs/reactnative/common-content/ui-components/call/call-top-view/title.mdx
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
Title to be rendered at the center of the Header. | ||
|
||
| Type | | ||
| ----------------------- | | ||
| `string` \| `undefined` | |
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
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