1
0
mirror of https://github.com/ascribe/onion.git synced 2024-12-23 18:13:49 +01:00
onion/js/components/ascribe_spinner.js

36 lines
951 B
JavaScript
Raw Normal View History

2015-10-08 11:12:15 +02:00
'use strict';
import React from 'react';
import classNames from 'classnames';
let AscribeSpinner = React.createClass({
propTypes: {
classNames: React.PropTypes.string,
2015-10-08 11:12:15 +02:00
size: React.PropTypes.oneOf(['sm', 'md', 'lg']),
color: React.PropTypes.oneOf(['blue', 'dark-blue', 'light-blue', 'pink', 'black', 'loop'])
},
getDefaultProps() {
return {
inline: false,
2015-10-08 20:26:29 +02:00
size: 'md',
2015-10-08 11:12:15 +02:00
color: 'loop'
};
},
render() {
return (
2015-11-03 10:39:01 +01:00
<div
className={
classNames('spinner-wrapper-' + this.props.size,
'spinner-wrapper-' + this.props.color,
this.props.classNames)}>
<div className={classNames('spinner-circle')}></div>
<div className={classNames('spinner-inner')}>A</div>
2015-10-08 11:12:15 +02:00
</div>
);
}
});
export default AscribeSpinner;