mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-27 01:25:52 -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"
|
||||
/>
|
||||
);
|
||||
const spinner = <Spinner />;
|
||||
const plus = (
|
||||
<img
|
||||
alt="plus-icon"
|
||||
|
@ -62,7 +61,7 @@ const StudioButton = ({
|
|||
)}
|
||||
>
|
||||
{(hasRequestOutstanding ?
|
||||
spinner :
|
||||
<Spinner /> :
|
||||
(includesProject ? checkmark : plus))}
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -5,12 +5,14 @@ const classNames = require('classnames');
|
|||
require('./spinner.scss');
|
||||
|
||||
// Adapted from http://tobiasahlin.com/spinkit/
|
||||
// Available colors right now are white, blue and transparent-gray
|
||||
const Spinner = props => (
|
||||
const Spinner = ({
|
||||
className,
|
||||
color
|
||||
}) => (
|
||||
<img
|
||||
alt="loading animation"
|
||||
className={classNames('studio-status-icon-spinner', props.className)}
|
||||
src={`/svgs/modal/spinner-${props.color}.svg`}
|
||||
className={classNames('studio-status-icon-spinner', className)}
|
||||
src={`/svgs/modal/spinner-${color}.svg`}
|
||||
/>
|
||||
);
|
||||
|
||||
|
@ -20,7 +22,7 @@ Spinner.defaultProps = {
|
|||
|
||||
Spinner.propTypes = {
|
||||
className: PropTypes.string,
|
||||
color: PropTypes.string
|
||||
color: PropTypes.oneOf(['white', 'blue', 'transparent-gray'])
|
||||
};
|
||||
|
||||
module.exports = Spinner;
|
||||
|
|
Loading…
Reference in a new issue