Files
supabase/studio/components/interfaces/Reports/ReportHeader.tsx
T
Ivan Vasilov 6648acacea Migrate CSS classes for light text (#17725)
* 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.
2023-09-26 11:05:28 +02:00

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