1
0
mirror of https://gitlab.nic.cz/turris/reforis/foris-js.git synced 2024-12-24 00:01:36 +01:00

Merge branch 'css-refactoring' into 'dev'

Added styles extracted from reForis.

See merge request turris/reforis/foris-js!85
This commit is contained in:
Maciej Lenartowicz 2020-02-14 17:26:24 +01:00
commit 8b7c459855
4 changed files with 51 additions and 0 deletions

15
src/bootstrap/Modal.css Normal file
View File

@ -0,0 +1,15 @@
@keyframes modalFade {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.modal.show {
display: block;
animation-name: modalFade;
animation-duration: .3s;
background: rgba(0, 0, 0, 0.2);
}

View File

@ -10,6 +10,7 @@ import PropTypes from "prop-types";
import { Portal } from "../utils/Portal"; import { Portal } from "../utils/Portal";
import { useClickOutside } from "../utils/hooks"; import { useClickOutside } from "../utils/hooks";
import "./Modal.css";
Modal.propTypes = { Modal.propTypes = {
/** Is modal shown value */ /** Is modal shown value */

33
src/bootstrap/Spinner.css Normal file
View File

@ -0,0 +1,33 @@
.spinner-wrapper .spinner-border {
width: 4rem;
height: 4rem;
color: #00a2e2;
}
.spinner-fs-background {
background-color: rgba(2, 2, 2, .5);
color: rgb(230, 230, 230);
position: fixed;
width: 100%;
height: 100%;
top: 0;
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
/*
* Set to high value to me sure that it always overlaps all components
* https://getbootstrap.com/docs/4.3/layout/overview/#z-index
*/
z-index: 1100;
}
.spinner-fs-wrapper .spinner-border {
width: 6rem;
height: 6rem;
}
.spinner-fs-wrapper .spinner-text {
margin: 1rem;
}

View File

@ -8,6 +8,8 @@
import React from "react"; import React from "react";
import PropTypes from "prop-types"; import PropTypes from "prop-types";
import "./Spinner.css";
Spinner.propTypes = { Spinner.propTypes = {
/** Children components put into `div` with "spinner-text" class. */ /** Children components put into `div` with "spinner-text" class. */
children: PropTypes.oneOfType([ children: PropTypes.oneOfType([