Skip to content

Commit

Permalink
Merge branch 'release/v0.6.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarman committed Jul 10, 2018
2 parents 34745d4 + 1c89c07 commit d2c48a7
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 83 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "skeleton-ui-react",
"version": "0.6.0",
"version": "0.6.1",
"description": "React SPA Starter Project",
"main": "index.js",
"repository": "[email protected]:leanstacks/skeleton-ui-react.git",
Expand Down
5 changes: 4 additions & 1 deletion src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ if (technologiesLastUpdated.add(1, 'hours').isBefore(moment())) {
// Fetch Data using API
store.dispatch(startSetTechnologies()).then(() => {
console.log('startSetTechnologies success');
renderApp();
// Simulate API Latency -- Remove in Production
setTimeout(() => {
renderApp();
}, 2000);
}).catch((err) => {
//TODO Handle API Failure
console.log('startSetTechnologies failure');
Expand Down
27 changes: 14 additions & 13 deletions src/components/BusyIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,28 @@ import React from 'react';
const getSizeClass = (size) => {
switch (size) {
case 'xl':
return 'busy-indicator--xl';
return 'h1';
case 'lg':
return 'busy-indicator--lg';
return 'lead';
case 'sm':
return 'busy-indicator--sm';
return 'small';
default:
return 'busy-indicator--md';
return '';
};
};

const BusyIndicator = (props) => {
const icon = props.icon || 'fa-circle-o-notch';
const icon = props.icon || 'fa-circle-notch';
return (
<div className={'busy-indicator ' + getSizeClass(props.size)}>
<div className="busy-indicator__content">
<div className="busy-indicator__heading">
<div className="busy-indicator__title">{props.title}</div>
</div>
<div className="busy-indicator__body">
<i className={'busy-indicator__icon fa fa-fw fa-spin ' + icon} />
</div>
<div className="h-100 d-flex flex-column justify-content-center text-center">
<div className={getSizeClass(props.size)}>
{
props.title ? (
<span>{props.title}&nbsp;<i className={'fas fa-spin ' + icon} /></span>
) : (
<i className={'fas fa-spin ' + icon} />
)
}
</div>
</div>
);
Expand Down
4 changes: 2 additions & 2 deletions src/components/LoadingPage.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import React from 'react';
import BusyIndicator from './BusyIndicator';

const LoadingPage = () => (
<div className="busy-indicator--full-page">
<BusyIndicator size="xl" />
<div className="page-full">
<BusyIndicator size="xl" title="Loading..." />
</div>
);

Expand Down
20 changes: 15 additions & 5 deletions src/styles/base/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@ a {
}
}

.page {
min-height: 75vh;
}

.text-blue {
color: $blue;
}
Expand All @@ -30,4 +26,18 @@ a {

.text-react-blue {
color: $react-blue;
}
}

.page {
min-height: 75vh;
}

.page-full {
height: 100vh;
width: 100vw;
}

.page-half {
height: 50vh;
width: 100vw;
}
43 changes: 0 additions & 43 deletions src/styles/components/_busy-indicator.scss

This file was deleted.

1 change: 0 additions & 1 deletion src/styles/styles.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
@import './base/settings';
@import './base/base';
@import './components/busy-indicator';
@import './components/footer';
21 changes: 5 additions & 16 deletions src/tests/components/__snapshots__/BusyIndicator.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,14 @@

exports[`should render BusyIndicator correctly 1`] = `
<div
className="busy-indicator busy-indicator--md"
className="h-100 d-flex flex-column justify-content-center text-center"
>
<div
className="busy-indicator__content"
className=""
>
<div
className="busy-indicator__heading"
>
<div
className="busy-indicator__title"
/>
</div>
<div
className="busy-indicator__body"
>
<i
className="busy-indicator__icon fa fa-fw fa-spin fa-circle-o-notch"
/>
</div>
<i
className="fas fa-spin fa-circle-notch"
/>
</div>
</div>
`;
3 changes: 2 additions & 1 deletion src/tests/components/__snapshots__/LoadingPage.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

exports[`should render LoadingPage correctly 1`] = `
<div
className="busy-indicator--full-page"
className="page-full"
>
<BusyIndicator
size="xl"
title="Loading..."
/>
</div>
`;

0 comments on commit d2c48a7

Please sign in to comment.