1
0
mirror of https://github.com/ascribe/onion.git synced 2024-11-15 09:35:10 +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 (
<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;