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';
|
2021-11-08 20:13:56 +08:00
|
|
|
import Styled 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
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2021-08-28 02:32:56 +08:00
|
|
|
const ClosePresentationComponent = ({
|
|
|
|
intl, toggleSwapLayout, layoutContextDispatch, isIphone,
|
|
|
|
}) => (
|
2021-11-08 20:13:56 +08:00
|
|
|
<Styled.CloseButton
|
|
|
|
isIphone={isIphone}
|
2021-09-30 03:23:58 +08:00
|
|
|
color="muted"
|
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"
|
2021-08-05 19:03:24 +08:00
|
|
|
onClick={() => toggleSwapLayout(layoutContextDispatch)}
|
2019-01-26 00:21:05 +08:00
|
|
|
label={intl.formatMessage(intlMessages.closePresentationLabel)}
|
2021-03-29 10:12:58 +08:00
|
|
|
aria-label={intl.formatMessage(intlMessages.closePresentationLabel)}
|
2019-01-26 00:21:05 +08:00
|
|
|
hideLabel
|
|
|
|
/>
|
2019-01-17 01:01:22 +08:00
|
|
|
);
|
2018-12-15 04:16:15 +08:00
|
|
|
|
|
|
|
export default injectIntl(ClosePresentationComponent);
|