UNPKG

stream-chat-react

Version:

React components to create chat conversations or livestream style chat

19 lines (18 loc) 967 B
import React from 'react'; import { ModalHeader } from '../../Modal/ModalHeader'; import { PollOptionList } from '../PollOptionList'; import { useStateStore } from '../../../store'; import { usePollContext, useTranslationContext } from '../../../context'; const pollStateSelector = (nextValue) => ({ name: nextValue.name, }); export const PollOptionsFullList = ({ close }) => { const { t } = useTranslationContext(); const { poll } = usePollContext(); const { name } = useStateStore(poll.state, pollStateSelector); return (React.createElement("div", { className: 'str-chat__modal__poll-option-list' }, React.createElement(ModalHeader, { close: close, title: t('Poll options') }), React.createElement("div", { className: 'str-chat__modal__poll-option-list__body' }, React.createElement("div", { className: 'str-chat__modal__poll-option-list__title' }, name), React.createElement(PollOptionList, null)))); };