Vylepšené loadery

This commit is contained in:
2023-08-19 11:56:24 +02:00
parent 47d23c1581
commit 3d2dfb10f1
3 changed files with 62 additions and 10 deletions

View File

@@ -0,0 +1,19 @@
import { IconDefinition } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'
type Props = {
title?: String,
icon: IconDefinition,
description: String,
animation?: String,
}
function Loader(props: Props) {
return <div className='loader'>
<h1>{props.title || 'Prosím čekejte...'}</h1>
<FontAwesomeIcon icon={props.icon} className={`loader-icon mb-3 ` + (props.animation ?? '')} />
<p>{props.description}</p>
</div>
}
export default Loader;