mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
* Replace all occurences of text-scale-1100 to text-foreground-light. * Replace all occurences of text-scale-1000 with text-foreground-light. * Fix double uses of text-foreground-light.
29 lines
711 B
TypeScript
29 lines
711 B
TypeScript
import { Button, IconRefreshCw } from 'ui'
|
|
|
|
interface Props {
|
|
title: string
|
|
onRefresh: () => void
|
|
isLoading: boolean
|
|
}
|
|
|
|
const ReportHeader: React.FC<Props> = ({ title, onRefresh, isLoading }) => (
|
|
<div className="flex flex-row justify-between gap-4 items-center">
|
|
<h1 className="text-2xl text-foreground">{title}</h1>
|
|
<Button
|
|
type="default"
|
|
size="tiny"
|
|
onClick={onRefresh}
|
|
disabled={isLoading ? true : false}
|
|
icon={
|
|
<IconRefreshCw
|
|
size="tiny"
|
|
className={`text-foreground-light ${isLoading ? 'animate-spin' : ''}`}
|
|
/>
|
|
}
|
|
>
|
|
{isLoading ? 'Refreshing' : 'Refresh'}
|
|
</Button>
|
|
</div>
|
|
)
|
|
export default ReportHeader
|