diff --git a/src/components/functional/FullScreen/index.test.tsx b/src/components/functional/FullScreen/index.test.tsx index f0ba80e..549a079 100644 --- a/src/components/functional/FullScreen/index.test.tsx +++ b/src/components/functional/FullScreen/index.test.tsx @@ -1,5 +1,3 @@ -import React from 'react'; - import { render, screen, fireEvent } from '@testing-library/react'; import '@testing-library/jest-dom'; @@ -61,7 +59,7 @@ describe('functional/FullScreen', () => { ); expect(screen.getByRole('button')).toHaveClass( - 'absolute right-0 bottom-0 p-2' + 'absolute right-0 bottom-0 p-2 z-50' ); }); }); diff --git a/src/components/functional/FullScreen/index.tsx b/src/components/functional/FullScreen/index.tsx index 8b649f3..5b256ef 100644 --- a/src/components/functional/FullScreen/index.tsx +++ b/src/components/functional/FullScreen/index.tsx @@ -1,41 +1,35 @@ -type Props = { - children: ReactNode; -}; import type { ReactNode } from 'react'; import { Maximize, Minimize } from 'lucide-react'; import { FullScreen as ReactFullScreen } from 'react-full-screen'; import { useFullScreen } from './hook'; +type Props = { + children: ReactNode; +}; export const FullScreen: React.FC = ({ children }) => { const { handle, handleClick } = useFullScreen(); return (
- {!handle.active && ( + + {children} - )} - - {children} - {handle.active && ( - - )} + ) : ( + + )} +
);