mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-30 02:56:20 -05:00
convention fixes
This commit is contained in:
parent
c54b7413bc
commit
497aae2a3c
2 changed files with 8 additions and 7 deletions
|
@ -24,7 +24,6 @@ const StudioButton = ({
|
||||||
src="/svgs/modal/confirm.svg"
|
src="/svgs/modal/confirm.svg"
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
const spinner = <Spinner />;
|
|
||||||
const plus = (
|
const plus = (
|
||||||
<img
|
<img
|
||||||
alt="plus-icon"
|
alt="plus-icon"
|
||||||
|
@ -62,7 +61,7 @@ const StudioButton = ({
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{(hasRequestOutstanding ?
|
{(hasRequestOutstanding ?
|
||||||
spinner :
|
<Spinner /> :
|
||||||
(includesProject ? checkmark : plus))}
|
(includesProject ? checkmark : plus))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -5,12 +5,14 @@ const classNames = require('classnames');
|
||||||
require('./spinner.scss');
|
require('./spinner.scss');
|
||||||
|
|
||||||
// Adapted from http://tobiasahlin.com/spinkit/
|
// Adapted from http://tobiasahlin.com/spinkit/
|
||||||
// Available colors right now are white, blue and transparent-gray
|
const Spinner = ({
|
||||||
const Spinner = props => (
|
className,
|
||||||
|
color
|
||||||
|
}) => (
|
||||||
<img
|
<img
|
||||||
alt="loading animation"
|
alt="loading animation"
|
||||||
className={classNames('studio-status-icon-spinner', props.className)}
|
className={classNames('studio-status-icon-spinner', className)}
|
||||||
src={`/svgs/modal/spinner-${props.color}.svg`}
|
src={`/svgs/modal/spinner-${color}.svg`}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -20,7 +22,7 @@ Spinner.defaultProps = {
|
||||||
|
|
||||||
Spinner.propTypes = {
|
Spinner.propTypes = {
|
||||||
className: PropTypes.string,
|
className: PropTypes.string,
|
||||||
color: PropTypes.string
|
color: PropTypes.oneOf(['white', 'blue', 'transparent-gray'])
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = Spinner;
|
module.exports = Spinner;
|
||||||
|
|
Loading…
Reference in a new issue