mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 13:49:09 +03:00
* Final replacements of ui setNotification with toast * Rip out UiStore * Rip out UiStore * Shift files under authConfigSchema to components/Auth * Rip out use of observers
28 lines
818 B
TypeScript
28 lines
818 B
TypeScript
// [Joshen] Just FYI eventually we're going to move to use toasts
|
|
// from the UI library, but this is a transition to move everything to
|
|
// react-hot-toast while we're trying to deprecate mobx entirely
|
|
|
|
import SparkBar from './SparkBar'
|
|
|
|
interface ToastLoaderProps {
|
|
progress: number
|
|
message: string
|
|
description?: string
|
|
}
|
|
|
|
export const ToastLoader = ({ progress, message, description }: ToastLoaderProps) => {
|
|
return (
|
|
<div className="flex flex-col space-y-2" style={{ minWidth: '220px' }}>
|
|
<SparkBar
|
|
value={progress}
|
|
max={100}
|
|
type="horizontal"
|
|
barClass="bg-brand"
|
|
labelBottom={message}
|
|
labelTop={`${progress.toFixed(2)}%`}
|
|
/>
|
|
{description !== undefined && <p className="text-xs text-foreground-light">{description}</p>}
|
|
</div>
|
|
)
|
|
}
|