mirror of
https://github.com/Dasemu/skipredictor.git
synced 2026-11-26 07:16:15 +00:00
50 lines
1.2 KiB
TypeScript
50 lines
1.2 KiB
TypeScript
import type { ReactNode } from 'react'
|
|
|
|
interface BlockProps {
|
|
title: string
|
|
message: string
|
|
action?: ReactNode
|
|
}
|
|
|
|
export function SplashScreen() {
|
|
return (
|
|
<section className="auth-shell auth-shell--splash">
|
|
<div className="auth-card">
|
|
<p className="eyebrow">Ski Predictor</p>
|
|
<h1>Preparando la app</h1>
|
|
<p className="auth-card__hint">
|
|
Cargando sesión, preferencias y últimas predicciones.
|
|
</p>
|
|
</div>
|
|
</section>
|
|
)
|
|
}
|
|
|
|
export function LoadingBlock({ title, message }: BlockProps) {
|
|
return (
|
|
<section className="state-block">
|
|
<div className="loader" aria-hidden="true" />
|
|
<h3>{title}</h3>
|
|
<p>{message}</p>
|
|
</section>
|
|
)
|
|
}
|
|
|
|
export function EmptyBlock({ title, message, action }: BlockProps) {
|
|
return (
|
|
<section className="state-block">
|
|
<h3>{title}</h3>
|
|
<p>{message}</p>
|
|
{action}
|
|
</section>
|
|
)
|
|
}
|
|
|
|
export function ErrorBanner({ message }: { message: string }) {
|
|
return <div className="notice-banner notice-banner--error">{message}</div>
|
|
}
|
|
|
|
export function InfoBanner({ message }: { message: string }) {
|
|
return <div className="notice-banner notice-banner--info">{message}</div>
|
|
}
|