2019-01-08 02:12:28 +08:00
|
|
|
import React from 'react';
|
2019-01-15 21:13:55 +08:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
2019-01-08 02:12:28 +08:00
|
|
|
import Button from '/imports/ui/components/button/component';
|
2019-01-15 21:13:55 +08:00
|
|
|
import cx from 'classnames';
|
2019-01-25 21:06:17 +08:00
|
|
|
import { styles } from './styles';
|
2019-01-08 02:12:28 +08:00
|
|
|
|
|
|
|
const intlMessages = defineMessages({
|
|
|
|
fullscreenButton: {
|
|
|
|
id: 'app.fullscreenButton.label',
|
|
|
|
description: 'Fullscreen label',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2019-01-26 00:21:05 +08:00
|
|
|
const FullscreenButtonComponent = ({ intl, handleFullscreen, dark }) => (
|
|
|
|
<div className={cx(styles.wrapper, dark ? styles.dark : null)}>
|
2019-01-15 21:13:55 +08:00
|
|
|
<Button
|
|
|
|
role="button"
|
|
|
|
aria-labelledby="fullscreenButtonLabel"
|
|
|
|
aria-describedby="fullscreenButtonDesc"
|
|
|
|
color="default"
|
|
|
|
icon="fullscreen"
|
|
|
|
size="sm"
|
|
|
|
onClick={handleFullscreen}
|
|
|
|
label={intl.formatMessage(intlMessages.fullscreenButton)}
|
|
|
|
hideLabel
|
|
|
|
circle
|
|
|
|
className={styles.button}
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
);
|
2019-01-08 02:12:28 +08:00
|
|
|
|
|
|
|
export default injectIntl(FullscreenButtonComponent);
|