import PropTypes from 'prop-types'; import React from 'react'; import classNames from 'classnames'; import {defineMessages, injectIntl, intlShape} from 'react-intl'; import styles from './play-button.css'; import playIcon from './icon--play.svg'; import stopIcon from './icon--stop.svg'; const messages = defineMessages({ play: { id: 'gui.playButton.play', description: 'Title of the button to start playing the sound', defaultMessage: 'Play' }, stop: { id: 'gui.playButton.stop', description: 'Title of the button to stop the sound', defaultMessage: 'Stop' } }); const PlayButtonComponent = ({ className, intl, isPlaying, onClick, onMouseDown, onMouseEnter, onMouseLeave, setButtonRef, ...props }) => { const label = isPlaying ? intl.formatMessage(messages.stop) : intl.formatMessage(messages.play); return (