Skip to content

Commit d2c48a7

Browse files
committed
Merge branch 'release/v0.6.1'
2 parents 34745d4 + 1c89c07 commit d2c48a7

File tree

9 files changed

+43
-83
lines changed

9 files changed

+43
-83
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "skeleton-ui-react",
3-
"version": "0.6.0",
3+
"version": "0.6.1",
44
"description": "React SPA Starter Project",
55
"main": "index.js",
66
"repository": "[email protected]:leanstacks/skeleton-ui-react.git",

src/app.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@ if (technologiesLastUpdated.add(1, 'hours').isBefore(moment())) {
4242
// Fetch Data using API
4343
store.dispatch(startSetTechnologies()).then(() => {
4444
console.log('startSetTechnologies success');
45-
renderApp();
45+
// Simulate API Latency -- Remove in Production
46+
setTimeout(() => {
47+
renderApp();
48+
}, 2000);
4649
}).catch((err) => {
4750
//TODO Handle API Failure
4851
console.log('startSetTechnologies failure');

src/components/BusyIndicator.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,28 @@ import React from 'react';
33
const getSizeClass = (size) => {
44
switch (size) {
55
case 'xl':
6-
return 'busy-indicator--xl';
6+
return 'h1';
77
case 'lg':
8-
return 'busy-indicator--lg';
8+
return 'lead';
99
case 'sm':
10-
return 'busy-indicator--sm';
10+
return 'small';
1111
default:
12-
return 'busy-indicator--md';
12+
return '';
1313
};
1414
};
1515

1616
const BusyIndicator = (props) => {
17-
const icon = props.icon || 'fa-circle-o-notch';
17+
const icon = props.icon || 'fa-circle-notch';
1818
return (
19-
<div className={'busy-indicator ' + getSizeClass(props.size)}>
20-
<div className="busy-indicator__content">
21-
<div className="busy-indicator__heading">
22-
<div className="busy-indicator__title">{props.title}</div>
23-
</div>
24-
<div className="busy-indicator__body">
25-
<i className={'busy-indicator__icon fa fa-fw fa-spin ' + icon} />
26-
</div>
19+
<div className="h-100 d-flex flex-column justify-content-center text-center">
20+
<div className={getSizeClass(props.size)}>
21+
{
22+
props.title ? (
23+
<span>{props.title}&nbsp;<i className={'fas fa-spin ' + icon} /></span>
24+
) : (
25+
<i className={'fas fa-spin ' + icon} />
26+
)
27+
}
2728
</div>
2829
</div>
2930
);

src/components/LoadingPage.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ import React from 'react';
33
import BusyIndicator from './BusyIndicator';
44

55
const LoadingPage = () => (
6-
<div className="busy-indicator--full-page">
7-
<BusyIndicator size="xl" />
6+
<div className="page-full">
7+
<BusyIndicator size="xl" title="Loading..." />
88
</div>
99
);
1010

src/styles/base/_base.scss

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,6 @@ a {
1616
}
1717
}
1818

19-
.page {
20-
min-height: 75vh;
21-
}
22-
2319
.text-blue {
2420
color: $blue;
2521
}
@@ -30,4 +26,18 @@ a {
3026

3127
.text-react-blue {
3228
color: $react-blue;
33-
}
29+
}
30+
31+
.page {
32+
min-height: 75vh;
33+
}
34+
35+
.page-full {
36+
height: 100vh;
37+
width: 100vw;
38+
}
39+
40+
.page-half {
41+
height: 50vh;
42+
width: 100vw;
43+
}

src/styles/components/_busy-indicator.scss

Lines changed: 0 additions & 43 deletions
This file was deleted.

src/styles/styles.scss

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
@import './base/settings';
22
@import './base/base';
3-
@import './components/busy-indicator';
43
@import './components/footer';

src/tests/components/__snapshots__/BusyIndicator.test.js.snap

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,14 @@
22

33
exports[`should render BusyIndicator correctly 1`] = `
44
<div
5-
className="busy-indicator busy-indicator--md"
5+
className="h-100 d-flex flex-column justify-content-center text-center"
66
>
77
<div
8-
className="busy-indicator__content"
8+
className=""
99
>
10-
<div
11-
className="busy-indicator__heading"
12-
>
13-
<div
14-
className="busy-indicator__title"
15-
/>
16-
</div>
17-
<div
18-
className="busy-indicator__body"
19-
>
20-
<i
21-
className="busy-indicator__icon fa fa-fw fa-spin fa-circle-o-notch"
22-
/>
23-
</div>
10+
<i
11+
className="fas fa-spin fa-circle-notch"
12+
/>
2413
</div>
2514
</div>
2615
`;

src/tests/components/__snapshots__/LoadingPage.test.js.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22

33
exports[`should render LoadingPage correctly 1`] = `
44
<div
5-
className="busy-indicator--full-page"
5+
className="page-full"
66
>
77
<BusyIndicator
88
size="xl"
9+
title="Loading..."
910
/>
1011
</div>
1112
`;

0 commit comments

Comments
 (0)