openreplay/frontend/app/player-ui/FullScreenButton.tsx
Andrey Babushkin fd5c0c9747
Add lokalisation (#3092)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales
2025-03-06 17:43:15 +01:00

36 lines
976 B
TypeScript

import React from 'react';
import { Popover, Button } from 'antd';
import { FullscreenOutlined } from '@ant-design/icons';
import { PlaySessionInFullscreenShortcut } from 'Components/Session_/Player/Controls/components/KeyboardHelp';
import { useTranslation } from 'react-i18next';
interface IProps {
size: number;
onClick: () => void;
customClasses?: string;
noShortcut?: boolean;
}
export function FullScreenButton({ size = 18, onClick, noShortcut }: IProps) {
const { t } = useTranslation();
return (
<Popover
content={
<div className="flex gap-2 items-center">
{!noShortcut ? <PlaySessionInFullscreenShortcut /> : null}
<div>{t('Play In Fullscreen')}</div>
</div>
}
placement="topRight"
>
<Button
onClick={onClick}
shape="circle"
size="small"
className="flex items-center justify-center"
icon={<FullscreenOutlined />}
/>
</Popover>
);
}