hedgedoc/src/components/application-loader/loading-screen.tsx
Philip Molares c8e42eebd4
Replace font awesome with fork awesome (#114)
* added fork-awesome-icon
* removed fontAwesome
* changed FontAwesomeIcon to ForkAwesomeIcon

Signed-off-by: Philip Molares <philip.molares@udo.edu>
2020-05-31 22:21:32 +02:00

28 lines
795 B
TypeScript

import React from 'react'
import { Alert } from 'react-bootstrap'
import { ForkAwesomeIcon } from '../../fork-awesome/fork-awesome-icon'
export interface LoadingScreenProps {
failedTitle: string
}
export const LoadingScreen: React.FC<LoadingScreenProps> = ({ failedTitle }) => {
return (
<div className="loader middle">
<div className="icon text-white">
<ForkAwesomeIcon icon="file-text" size="5x"
className={failedTitle ? 'animation-shake' : 'animation-pulse'}/>
</div>
{
failedTitle !== ''
? (
<Alert variant={'danger'}>
The task '{failedTitle}' failed.<br/>
For further information look into the browser console.
</Alert>
)
: null
}
</div>
)
}