Skip to content

Commit 70cb992

Browse files
committed
docs: add full option list docs
1 parent 1515348 commit 70cb992

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
---
2+
id: poll-all-options
3+
title: PollAllOptions
4+
---
5+
6+
import MessageProp from '../common-content/contexts/message-context/message.mdx';
7+
import Poll from '../common-content/contexts/poll-context/poll.mdx';
8+
9+
A component used to render a list of all of the options that a `Poll` has. Voting on each option on this screen is also enabled. Needs to be structured inside a [`Channel` component](../core-components/channel).
10+
11+
It will render its default `PollAllOptionsContent`, which can be overridden for custom UI. Its children have access to the entire `poll` state through the `usePollState` hook.
12+
13+
## Props
14+
15+
### <div class="label description">_forwarded from [MessageContext](../../contexts/message-context#message)_ props</div> message {#message}
16+
17+
<MessageProp />
18+
19+
### `poll` *
20+
21+
<Poll />
22+
23+
### `additionalScrollViewProps`
24+
25+
A prop used to override the underlying [`ScrollView`](https://reactnative.dev/docs/scrollview#props) props of the `PollAllOptions`.
26+
27+
```jsx
28+
const flatListProps = { bounces: true };
29+
30+
<PollAllOptions additionalFlatListProps={flatListProps} />;
31+
```
32+
33+
| Type |
34+
| ------ |
35+
| object |
36+
37+
### `PollAllOptionsContent`
38+
39+
A `Component` prop used to render the content of the `PollAllOptions` component.
40+
41+
The component has full access to the entire `Poll` reactive state through the `usePollState` hook.
42+
43+
| Type | Default |
44+
| ------------- | ---------------------------------------------- |
45+
| ComponentType | [`PollAllOptionsContent`](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Poll/PollOption.tsx) |
46+

0 commit comments

Comments
 (0)