2018-12-15 04:16:15 +08:00
|
|
|
import React from 'react';
|
2019-01-17 00:50:24 +08:00
|
|
|
import { defineMessages, injectIntl } from 'react-intl';
|
2018-12-15 04:16:15 +08:00
|
|
|
import Button from '/imports/ui/components/button/component';
|
2019-01-26 00:21:05 +08:00
|
|
|
import { styles } from './styles';
|
2018-12-15 04:16:15 +08:00
|
|
|
|
|
|
|
const intlMessages = defineMessages({
|
|
|
|
closePresentationLabel: {
|
2019-04-09 02:48:45 +08:00
|
|
|
id: 'app.presentation.hide',
|
|
|
|
description: 'Hide presentation label',
|
2018-12-15 04:16:15 +08:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2019-01-26 00:21:05 +08:00
|
|
|
const ClosePresentationComponent = ({ intl, toggleSwapLayout }) => (
|
|
|
|
<Button
|
|
|
|
role="button"
|
|
|
|
aria-labelledby="closeLabel"
|
|
|
|
aria-describedby="closeDesc"
|
|
|
|
color="primary"
|
2019-04-09 02:48:45 +08:00
|
|
|
icon="minus"
|
2019-01-26 00:21:05 +08:00
|
|
|
size="sm"
|
2021-03-02 05:47:08 +08:00
|
|
|
data-test="hidePresentationButton"
|
2019-01-26 00:21:05 +08:00
|
|
|
onClick={toggleSwapLayout}
|
|
|
|
label={intl.formatMessage(intlMessages.closePresentationLabel)}
|
|
|
|
hideLabel
|
|
|
|
className={styles.button}
|
|
|
|
/>
|
2019-01-17 01:01:22 +08:00
|
|
|
);
|
2018-12-15 04:16:15 +08:00
|
|
|
|
|
|
|
export default injectIntl(ClosePresentationComponent);
|