Skip to content

Commit a829aa3

Browse files
author
Kakuev
committed
new changes
1 parent f613509 commit a829aa3

File tree

8 files changed

+77
-80
lines changed

8 files changed

+77
-80
lines changed

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
},
1212
"rules": {
13-
"linebreak-style": [ "warn", "windows" ],
13+
"linebreak-style": 0,
1414
"no-unused-vars": [ "warn", { "vars": "all", "args": "all", "ignoreRestSiblings": false } ],
1515
"react/jsx-filename-extension": [ 0, { "extensions": [ ".js", ".jsx" ] } ],
1616
"flowtype/boolean-style": [ 2, "boolean" ],
@@ -29,7 +29,8 @@
2929
"flowtype/valid-syntax": 1,
3030
"flowtype/no-types-missing-file-annotation": 2,
3131
"no-console": 1,
32-
"prettier/prettier": 0
32+
"prettier/prettier": 0,
33+
"no-func-assign": 0
3334
},
3435
"env": {
3536
"es6": true,

dist/bundle.css

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@
1414
flex-wrap: wrap; }
1515

1616
.btn {
17-
padding: 0.7em 2em;
17+
padding: 0.3em 1em;
1818
border: 1px solid #d3d3d3;
1919
background: white;
20-
transition: all 0.2s; }
20+
transition: all 0.2s;
21+
outline: none; }
2122
.btn:hover {
2223
cursor: pointer; }
2324
.btn:disabled {

dist/bundle.js renamed to dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ function (_Component) {
135135
var _this = this;
136136

137137
return React.createElement("div", {
138-
className: "flex justify-content-center align-items-center"
138+
className: "flex align-items-center"
139139
}, this.props.buttons && this.props.buttons.map(function (button, i) {
140140
return React.createElement("button", {
141141
key: i,

package.json

Lines changed: 64 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,66 @@
11
{
2-
"name": "rcomponents",
3-
"version": "1.0.0",
4-
"main": "index.js",
5-
"author": "kakuevn",
6-
"license": "MIT",
7-
"scripts": {
8-
"dev": "rollup -c --watch",
9-
"build": "rollup -c",
10-
"start": "npm-run-all --parallel dev test:watch",
11-
"test": "jest",
12-
"test:watch": "jest --watch",
13-
"storybook": "start-storybook -p 6006",
14-
"build-storybook": "build-storybook"
15-
},
16-
"jest": {
17-
"testURL": "http://localhost/",
18-
"moduleDirectories": [
19-
"node_modules",
20-
"bower_components",
21-
"shared"
22-
],
23-
"transformIgnorePatterns": [
24-
"/node_modules/(?!(our-react-components-.*?\\.js$))"
25-
],
26-
"moduleNameMapper": {
27-
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js"
28-
}
29-
},
30-
"dependencies": {
31-
"react": "^16.5.0",
32-
"react-dom": "^16.5.0",
33-
"styled-components": "^3.4.9"
34-
},
35-
"devDependencies": {
36-
"@babel/cli": "^7.0.0",
37-
"@babel/core": "^7.0.0",
38-
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
39-
"@babel/preset-env": "^7.0.0",
40-
"@babel/preset-react": "^7.0.0",
41-
"@storybook/addon-actions": "^3.4.11",
42-
"@storybook/addon-links": "^3.4.11",
43-
"@storybook/addons": "^3.4.11",
44-
"@storybook/react": "^3.4.11",
45-
"babel-cli": "^6.26.0",
46-
"babel-eslint": "^10.0.1",
47-
"babel-runtime": "^6.26.0",
48-
"css-loader": "^1.0.0",
49-
"enzyme": "^3.3.0",
50-
"eslint": "^4.17.0",
51-
"eslint-friendly-formatter": "^4.0.1",
52-
"eslint-plugin-flow": "^2.29.1",
53-
"eslint-plugin-flowtype": "^2.42.0",
54-
"eslint-plugin-jsx-a11y": "^6.0.3",
55-
"eslint-plugin-prettier": "^2.6.0",
56-
"eslint-plugin-react": "^7.7.0",
57-
"jest": "^23.6.0",
58-
"node-sass": "^4.9.4",
59-
"npm-run-all": "^4.1.2",
60-
"prettier": "^1.10.2",
61-
"rollup-plugin-babel": "^4.0.3",
62-
"rollup-plugin-eslint": "^5.0.0",
63-
"rollup-plugin-node-resolve": "^3.4.0",
64-
"rollup-plugin-replace": "^2.1.0",
65-
"rollup-plugin-scss": "^0.4.0",
66-
"rollup-watch": "^4.3.1",
67-
"sass-loader": "^7.1.0",
68-
"sinon": "^4.2.2",
69-
"style-loader": "^0.23.1",
70-
"babel-core": "^6.26.3"
71-
}
2+
"name": "rcomponents",
3+
"version": "1.0.0",
4+
"main": "dist/index.js",
5+
"author": "kakuevn",
6+
"license": "MIT",
7+
"scripts": {
8+
"dev": "rollup -c --watch",
9+
"build": "rollup -c",
10+
"start": "npm-run-all --parallel dev test:watch",
11+
"test": "jest",
12+
"test:watch": "jest --watch",
13+
"storybook": "start-storybook -p 6006",
14+
"build-storybook": "build-storybook"
15+
},
16+
"jest": {
17+
"testURL": "http://localhost/",
18+
"moduleDirectories": [ "node_modules", "bower_components", "shared" ],
19+
"transformIgnorePatterns": [ "/node_modules/(?!(our-react-components-.*?\\.js$))" ],
20+
"moduleNameMapper": {
21+
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$": "<rootDir>/__mocks__/fileMock.js"
22+
}
23+
},
24+
"dependencies": {
25+
"react": "^16.5.0",
26+
"react-dom": "^16.5.0",
27+
"styled-components": "^3.4.9"
28+
},
29+
"devDependencies": {
30+
"@babel/cli": "^7.0.0",
31+
"@babel/core": "^7.0.0",
32+
"@babel/plugin-transform-modules-commonjs": "^7.1.0",
33+
"@babel/preset-env": "^7.0.0",
34+
"@babel/preset-react": "^7.0.0",
35+
"@storybook/addon-actions": "^3.4.11",
36+
"@storybook/addon-links": "^3.4.11",
37+
"@storybook/addons": "^3.4.11",
38+
"@storybook/react": "^3.4.11",
39+
"babel-cli": "^6.26.0",
40+
"babel-eslint": "^10.0.1",
41+
"babel-runtime": "^6.26.0",
42+
"css-loader": "^1.0.0",
43+
"enzyme": "^3.3.0",
44+
"eslint": "^4.17.0",
45+
"eslint-friendly-formatter": "^4.0.1",
46+
"eslint-plugin-flow": "^2.29.1",
47+
"eslint-plugin-flowtype": "^2.42.0",
48+
"eslint-plugin-jsx-a11y": "^6.0.3",
49+
"eslint-plugin-prettier": "^2.6.0",
50+
"eslint-plugin-react": "^7.7.0",
51+
"jest": "^23.6.0",
52+
"node-sass": "^4.9.4",
53+
"npm-run-all": "^4.1.2",
54+
"prettier": "^1.10.2",
55+
"rollup-plugin-babel": "^4.0.3",
56+
"rollup-plugin-eslint": "^5.0.0",
57+
"rollup-plugin-node-resolve": "^3.4.0",
58+
"rollup-plugin-replace": "^2.1.0",
59+
"rollup-plugin-scss": "^0.4.0",
60+
"rollup-watch": "^4.3.1",
61+
"sass-loader": "^7.1.0",
62+
"sinon": "^4.2.2",
63+
"style-loader": "^0.23.1",
64+
"babel-core": "^6.26.3"
65+
}
7266
}

rollup.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ const NODE_ENV = process.env.NODE_ENV || 'development';
99
export default {
1010
input: 'src/index.js',
1111
output: {
12-
file: 'dist/bundle.js',
12+
file: 'dist/index.js',
1313
globals: { 'styled-components': 'styled' },
1414
format: 'es'
1515
},
1616
external: [ 'react', 'styled-components' ],
1717
plugins: [
18-
eslint(),
18+
// eslint(),
1919
replace({
2020
'process.env.NODE_ENV': JSON.stringify(NODE_ENV)
2121
}),

src/components/PillBtn/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class PillBtn extends Component {
66
}
77
render() {
88
return (
9-
<div className="flex justify-content-center align-items-center">
9+
<div className="flex align-items-center">
1010
{this.props.buttons &&
1111
this.props.buttons.map((button, i) => {
1212
return (

src/style/_buttons.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
.btn {
2-
padding: 0.7em 2em;
2+
padding: 0.3em 1em;
33
border: 1px solid $colorGrey;
44
background: $colorWhite;
55
transition: all 0.2s;
6+
outline: none;
67

78
&:hover {
89
cursor: pointer;

stories/index.stories.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { action } from '@storybook/addon-actions';
55

66
import { Button } from '@storybook/react/demo';
77

8-
import { RoundBtn, Btn, PillBtn, OptionsList, PillOptions } from '../dist/bundle';
8+
import { RoundBtn, Btn, PillBtn, OptionsList, PillOptions } from '../dist/index';
99
import '../dist/bundle.css';
1010

1111
storiesOf('Buttons', module)

0 commit comments

Comments
 (0)