Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
gridsane committed Mar 27, 2017
1 parent 43257b4 commit 1dd76d6
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 14 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -13,6 +13,7 @@ env:
- MONGO_URI_TEST=mongodb://travis:test@127.0.0.1:27017/chdb_test
- YOUTUBE_KEY=dummy-key
install:
- npm install -g npm@latest
- npm install
script:
- npm run lint
Expand Down
14 changes: 0 additions & 14 deletions src/components/ui/index.js

This file was deleted.

45 changes: 45 additions & 0 deletions src/components/ui/loader/index.js
@@ -0,0 +1,45 @@
import React, {Component, PropTypes} from 'react';
import cn from 'classnames';
import styles from './loader.scss';

const sizes = {
s: 16,
m: 24,
l: 32,
xl: 48,
};

export default class Loader extends Component {
static propTypes = {
multicolor: PropTypes.bool,
strokeWidth: PropTypes.number,
size: PropTypes.oneOf(Object.keys(sizes)),
}

static defaultProps = {
strokeWidth: 4,
size: 'm',
multicolor: true,
}

render() {
const {size, strokeWidth, multicolor, className, style} = this.props;
const sizeStyle = {width: sizes[size], height: sizes[size]};

return <div className={className} style={{...sizeStyle, ...style}}>
<div className={styles.loader} style={sizeStyle}>
<svg className={styles.loaderCircle} viewBox="25 25 50 50">
<circle
className={cn(styles.loaderPath, {
[styles.loaderPathMulticolor]: multicolor,
})}
cx="50"
cy="50"
r="20"
fill="none"
strokeWidth={strokeWidth} />
</svg>
</div>
</div>;
}
}
2 changes: 2 additions & 0 deletions webpack.config.prod.js
Expand Up @@ -4,6 +4,7 @@ var ExtractTextPlugin = require('extract-text-webpack-plugin');
var autoprefixer = require('autoprefixer');

module.exports = {
bail: true,
devtool: 'hidden-cheap-module-source-map',
entry: [
'babel-polyfill',
Expand All @@ -17,6 +18,7 @@ module.exports = {
resolve: {
alias: {
components: path.join(__dirname, 'src/components'),
utils: path.join(__dirname, 'src/utils'),
},
},
plugins: [
Expand Down

0 comments on commit 1dd76d6

Please sign in to comment.