mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-03 19:38:20 +08:00
24 lines
629 B
TypeScript
24 lines
629 B
TypeScript
import React from 'react';
|
|
import './index.less';
|
|
import { fullScreen } from 'store/full-screen';
|
|
import { observer } from 'mobx-react';
|
|
|
|
@observer
|
|
export class FullScreen extends React.Component {
|
|
|
|
public handleClose = (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => {
|
|
if ((event.target as any).nodeName === 'SECTION') fullScreen.close();
|
|
}
|
|
|
|
public render() {
|
|
if (!fullScreen.content) return null;
|
|
return (
|
|
<section className="full-screen-mark" onClick={this.handleClose}>
|
|
<div className="full-screen-content">
|
|
{fullScreen.content}
|
|
</div>
|
|
</section>
|
|
);
|
|
}
|
|
}
|