Files
karma/ui/src/Components/CenteredMessage/index.js
Łukasz Mierzwa 2f74561809 chore(ui): drop react-reveal animations
This library is not maintained anymore and it causes small glitches when rendering a lot of alerts - scrolling groups into view doesn't always trigger animation and they stay hidden.
2020-07-03 17:03:43 +01:00

28 lines
620 B
JavaScript

import React from "react";
import { CSSTransition } from "react-transition-group";
import { ThemeContext } from "Components/Theme";
const CenteredMessage = ({ children, className }) => {
const context = React.useContext(ThemeContext);
return (
<CSSTransition
in={true}
appear={true}
classNames="components-animation-fade"
timeout={context.animations.duration}
>
<h1
className={`${
className ? className : "display-1 text-placeholder"
} screen-center`}
>
{children}
</h1>
</CSSTransition>
);
};
export { CenteredMessage };