openreplay/frontend/app/components/shared/ReloadButton/ReloadButton.tsx
Andrey Babushkin 5c9a29570c
Add lokalisation (#3104)
* applied eslint

* add locales and lint the project

* removed error boundary

* updated locales

* fix min files

* fix locales

* fix erorrs

* fix errors
2025-03-07 10:43:08 +01:00

28 lines
760 B
TypeScript

import React from 'react';
import { Button, Tooltip } from 'antd';
import { SyncOutlined } from '@ant-design/icons';
import { useTranslation } from 'react-i18next';
interface Props {
loading?: boolean;
onClick: () => void;
iconSize?: number;
buttonSize: 'small' | 'middle' | 'large' | undefined;
label?: string
}
export default function ReloadButton(props: Props) {
const { t } = useTranslation();
const { loading, onClick, iconSize = 18, buttonSize } = props;
return (
<Tooltip title={t('Refresh')} placement="right">
<Button
type="default"
size={buttonSize}
onClick={onClick}
icon={<SyncOutlined style={{ fontSize: iconSize }} />}
>
{props.label}
</Button>
</Tooltip>
);
}