mirror of
https://github.com/supabase/supabase.git
synced 2026-05-08 18:00:20 -04:00
4a0bb36ca8
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
29 lines
687 B
TypeScript
29 lines
687 B
TypeScript
import { LoaderCircle, RefreshCcw } from 'lucide-react'
|
|
|
|
import { ButtonTooltip } from '../ButtonTooltip'
|
|
|
|
interface RefreshButtonProps {
|
|
isLoading: boolean
|
|
onRefresh: () => void
|
|
}
|
|
|
|
export const RefreshButton = ({ isLoading, onRefresh }: RefreshButtonProps) => {
|
|
return (
|
|
<ButtonTooltip
|
|
size="tiny"
|
|
type="default"
|
|
disabled={isLoading}
|
|
onClick={onRefresh}
|
|
className="w-[26px]"
|
|
icon={
|
|
isLoading ? (
|
|
<LoaderCircle className="text-foreground animate-spin" />
|
|
) : (
|
|
<RefreshCcw className="text-foreground" />
|
|
)
|
|
}
|
|
tooltip={{ content: { side: 'bottom', text: 'Refresh logs' } }}
|
|
/>
|
|
)
|
|
}
|