import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { defineMessages, injectIntl, FormattedMessage } from 'react-intl'; import Button from '/imports/ui/components/button/component'; import styles from './styles.scss'; const intlMessages = defineMessages({ previousSlideLabel: { id: 'app.presentation.presentationToolbar.prevSlideLabel', description: 'Previous slide button label', }, nextSlideLabel: { id: 'app.presentation.presentationToolbar.nextSlideLabel', description: 'Next slide button label', }, }); class PresentationToolbar extends Component { static renderAriaLabelsDescs() { return ( ); } static renderSkipSlideOpts(numberOfSlides) { // Fill drop down menu with all the slides in presentation const optionList = []; for (let i = 1; i <= numberOfSlides; i += 1) { optionList.push( , ); } return optionList; } constructor(props) { super(props); this.state = { sliderValue: 100 }; this.handleValuesChange = this.handleValuesChange.bind(this); } componentDidMount() { // to let the whiteboard know that the presentation area's size has changed window.dispatchEvent(new Event('resize')); } componentWillUnmount() { // to let the whiteboard know that the presentation area's size has changed window.dispatchEvent(new Event('resize')); } handleValuesChange(event) { this.setState({ sliderValue: event.target.value }); } fitToWidthClickHandler() { this.setState({ fitToWidthValue: 'not_implemented_yet', }); } fitToScreenClickHandler() { this.setState({ fitToScreenValue: 'not_implemented_yet', }); } render() { const { currentSlideNum, numberOfSlides, actions, intl, } = this.props; return (
{PresentationToolbar.renderAriaLabelsDescs()}
); } } PresentationToolbar.propTypes = { // Number of current slide being displayed currentSlideNum: PropTypes.number.isRequired, // Total number of slides in this presentation numberOfSlides: PropTypes.number.isRequired, // Actions required for the presenter toolbar actions: PropTypes.shape({ nextSlideHandler: PropTypes.func.isRequired, previousSlideHandler: PropTypes.func.isRequired, skipToSlideHandler: PropTypes.func.isRequired, }).isRequired, }; export default injectIntl(PresentationToolbar);