1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-06-30 20:23:59 +00:00

Fix for withEither

This commit is contained in:
Maciej Lenartowicz 2019-11-15 08:55:24 +00:00
parent d935f78d6e
commit b30f9f59b4
4 changed files with 6 additions and 6 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "foris",
"version": "1.3.1",
"version": "1.3.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "foris",
"version": "1.3.1",
"version": "1.3.2",
"description": "Set of components and utils for Foris and its plugins.",
"author": "CZ.NIC, z.s.p.o.",
"repository": {

View File

@ -24,18 +24,18 @@ Spinner.defaultProps = {
};
export function Spinner({
fullScreen, children, className, ...props
fullScreen, children, className,
}) {
if (!fullScreen) {
return (
<div className={`spinner-wrapper ${className || "my-3 text-center"}`} {...props}>
<div className={`spinner-wrapper ${className || "my-3 text-center"}`}>
<SpinnerElement>{children}</SpinnerElement>
</div>
);
}
return (
<div className="spinner-fs-wrapper" {...props}>
<div className="spinner-fs-wrapper">
<div className="spinner-fs-background">
<SpinnerElement>{children}</SpinnerElement>
</div>

View File

@ -14,7 +14,7 @@ import { ErrorMessage } from "./ErrorMessage";
function withEither(conditionalFn, Either) {
return (Component) => (props) => {
if (conditionalFn(props)) {
return <Either />;
return <Either {...props} />;
}
return <Component {...props} />;
};