bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/captions/button/container.jsx

16 lines
680 B
React
Raw Normal View History

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { withModalMounter } from '/imports/ui/components/modal/service';
import Service from '/imports/ui/components/captions/service';
import CaptionsReaderMenuContainer from '/imports/ui/components/captions/reader-menu/container';
import CaptionButton from './component';
const Container = (props) => <CaptionButton {...props} />;
export default withModalMounter(withTracker(({ mountModal }) => ({
isActive: Service.isCaptionsActive(),
handleOnClick: () => (Service.isCaptionsActive()
? Service.deactivateCaptions()
: mountModal(<CaptionsReaderMenuContainer />)),
}))(Container));