openreplay/frontend/app/components/shared/ReloadButton/ReloadButton.tsx
2024-11-20 10:50:54 +01:00

23 lines
619 B
TypeScript

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