Замена wordpdf-cli на Spring Boot REST API: wordpdf-app, SPA wordpdf-web, docker-compose
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
interface Props {
|
||||
kind: 'success' | 'error'
|
||||
/** Для success: «Готово · имя · КБ»; для error: текст ошибки. */
|
||||
text: string
|
||||
}
|
||||
|
||||
/** Строка результата над/под кнопкой: успех (зелёный) или ошибка (красный). */
|
||||
export default function StatusMessage({ kind, text }: Props) {
|
||||
const ok = kind === 'success'
|
||||
return (
|
||||
<p
|
||||
role="status"
|
||||
aria-live="polite"
|
||||
className={`mt-5 flex items-center gap-2 text-sm font-medium ${
|
||||
ok ? 'text-ok' : 'text-err'
|
||||
}`}
|
||||
>
|
||||
<svg
|
||||
viewBox="0 0 20 20"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
strokeWidth="2"
|
||||
strokeLinecap="round"
|
||||
strokeLinejoin="round"
|
||||
className="h-4.5 w-4.5 shrink-0"
|
||||
aria-hidden="true"
|
||||
>
|
||||
{ok ? <path d="M4 10.5l4 4 8-9" /> : <path d="M5 5l10 10M15 5 5 15" />}
|
||||
</svg>
|
||||
{text}
|
||||
</p>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user