Skip to content

Commit

Permalink
#30 KeyGeneratingSection: add spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
fxnn committed Jan 20, 2018
1 parent 64baef4 commit cc8030c
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions webapp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"npm-run-all": "^4.1.2",
"promise": "8.0.1",
"rimraf": "2.6.2",
"spinkit": "1.2.5",
"style-loader": "0.19.1",
"webpack": "3.8.1",
"webpack-dev-server": "2.9.4",
Expand Down
6 changes: 6 additions & 0 deletions webapp/src/app/Spinner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import {h} from "hyperapp"
import "./Spinner.css"

export const Spinner = () => (
h("div", {class:"sk-cube-grid"}, [...Array(9)].map((_,i)=>h("div", {class:"sk-cube sk-cube" + (i+1)})))
);
8 changes: 8 additions & 0 deletions webapp/src/app/Spinner.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@

$spinkit-spinner-margin: 2em auto;
$spinkit-size: 3em;
$spinkit-spinner-color: #ffffff;

//@import "spinkit/scss/spinners/2-double-bounce";
@import "spinkit/scss/spinners/9-cube-grid";

2 changes: 2 additions & 0 deletions webapp/src/encryption/KeyGeneratingSection.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { h } from "hyperapp"
import { Spinner } from "app/Spinner";

export const KeyGeneratingSection = ({ logo }) => (
h("section", {class:"hero is-success is-fullheight"}, [
Expand All @@ -7,6 +8,7 @@ export const KeyGeneratingSection = ({ logo }) => (
h("h1", {class:"title"}, [
logo
]),
h(Spinner),
h("p", {}, "Your key is generated, please wait ...")
])
])
Expand Down

0 comments on commit cc8030c

Please sign in to comment.