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

36 lines
953 B
JavaScript
Raw Permalink 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(['black', 'blue', 'dark-blue', 'light-blue', 'pink', 'white', 'loop'])
2015-10-08 11:12:15 +02:00
},
getDefaultProps() {
return {
inline: false,
size: 'md'
2015-10-08 11:12:15 +02:00
};
},
render() {
const { classNames: classes, color, size } = this.props;
2015-10-08 11:12:15 +02:00
return (
2015-11-03 10:39:01 +01:00
<div
className={classNames('spinner-wrapper-' + size,
color ? 'spinner-wrapper-' + color : null,
classes)}>
<div className='spinner-circle' />
<div className='spinner-inner'>A</div>
2015-10-08 11:12:15 +02:00
</div>
);
}
});
export default AscribeSpinner;