Files
supabase/apps/studio/components/ui/DataTable/RefreshButton.tsx
Joshen Lim 620805a1ac chore/unified-logs-fixes-03 (#36725)
* Improve function logs styling + add copy button

* Add tooltips for buttons in toolbar

* Remove 'info' from levels

* Add export logs to csv and json functionality

* Add duration selection for download logs if no time range specified in search

* Fix TS

* Fix TS

* Update DataTableColumnStatusCode.tsx

---------

Co-authored-by: Jonathan Summers-Muir <MildTomato@users.noreply.github.com>
2025-07-10 09:13:10 +00:00

28 lines
686 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="outline"
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' } }}
/>
)
}