import { Button } from 'antd';
import { useState, useEffect } from 'react'
import { useFullscreen } from 'ahooks';
export default function FullScreen(props) {
    const { rootRef } = props;
    const [isFullscreen, { enterFullscreen, exitFullscreen, toggleFullscreen }] = useFullscreen(rootRef);
    return <img title={isFullscreen ? '退出全屏' : '全屏'} style={{
        cursor: "pointer",
        width: 58,
        height: 58
    }} onClick={e => {
        toggleFullscreen()
    }} alt='' src={isFullscreen ? `${process.env.PUBLIC_URL}/images/退出全屏.png` : `${process.env.PUBLIC_URL}/images/全屏.png`} />
}