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';
|
|
|
|
import { styles } from '../styles';
|
|
|
|
|
|
|
|
const intlMessages = defineMessages({
|
|
|
|
closePresentationLabel: {
|
|
|
|
id: 'app.presentation.close',
|
|
|
|
description: 'Close presentation label',
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
const ClosePresentationComponent = ({
|
|
|
|
intl,
|
|
|
|
innerStyle,
|
|
|
|
toggleSwapLayout,
|
|
|
|
}) => {
|
|
|
|
return (
|
|
|
|
<div style={innerStyle} className={styles.topRight}>
|
|
|
|
<Button
|
2019-01-17 00:50:24 +08:00
|
|
|
role="button"
|
|
|
|
aria-labelledby="closeLabel"
|
|
|
|
aria-describedby="closeDesc"
|
|
|
|
color="default"
|
|
|
|
icon="close"
|
|
|
|
size="sm"
|
|
|
|
onClick={toggleSwapLayout}
|
|
|
|
label={intl.formatMessage(intlMessages.closePresentationLabel)}
|
|
|
|
hideLabel
|
|
|
|
className={styles.close}
|
|
|
|
/>
|
2018-12-15 04:16:15 +08:00
|
|
|
</div>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default injectIntl(ClosePresentationComponent);
|