Skip to content

Commit 3d9d2e2

Browse files
committed
Added more loaders
1 parent 08beedc commit 3d9d2e2

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+1114
-231
lines changed

.eslintrc.json

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,29 @@
11
{
2-
"env": {
3-
"browser": true,
4-
"es2020": true
2+
"env": {
3+
"browser": true,
4+
"es2020": true
5+
},
6+
"extends": [
7+
"plugin:react/recommended",
8+
"plugin:jest/recommended",
9+
"standard",
10+
"prettier"
11+
],
12+
"parserOptions": {
13+
"ecmaFeatures": {
14+
"jsx": true
515
},
6-
"extends": [
7-
"plugin:react/recommended",
8-
"plugin:jest/recommended",
9-
"standard",
10-
"prettier"
11-
],
12-
"parserOptions": {
13-
"ecmaFeatures": {
14-
"jsx": true
15-
},
16-
"ecmaVersion": 11,
17-
"sourceType": "module"
18-
},
19-
"plugins": [
20-
"react",
21-
"prettier"
22-
],
23-
"rules": {
24-
"prettier/prettier": "error",
25-
"no-console": 1
26-
},
27-
"settings": {
28-
"react": {
29-
"version": "detect"
30-
}
16+
"ecmaVersion": 11,
17+
"sourceType": "module"
18+
},
19+
"plugins": ["react", "prettier"],
20+
"rules": {
21+
"prettier/prettier": "error",
22+
"no-console": 1
23+
},
24+
"settings": {
25+
"react": {
26+
"version": "detect"
3127
}
32-
}
28+
}
29+
}

package-lock.json

Lines changed: 25 additions & 127 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,14 @@
55
"main": "dist/bundle.cjs.js",
66
"module": "dist/bundle.esm.js",
77
"sideEffects": false,
8+
"files": [
9+
"dist"
10+
],
811
"scripts": {
912
"prebuild": "rimraf dist",
1013
"build": "rollup -c",
11-
"format": "eslint **/*.js && prettier **/*.js",
12-
"format:fix": "eslint **/*.js --fix && prettier **/*.js --write",
14+
"format": "eslint \"**/*.{js,jsx}\" && prettier \"**/*.js\"",
15+
"format:fix": "eslint \"**/*.js\" --fix && prettier \"**/*.js\" --write",
1316
"storybook": "start-storybook -p 9001 -c storybook",
1417
"storybook:build": "build-storybook -c storybook",
1518
"test": "jest",
@@ -18,7 +21,8 @@
1821
"test:coveralls": "jest --coverage && coveralls < coverage/lcov.info",
1922
"test:staged": "jest --findRelatedTests",
2023
"predeploy": "npm run storybook:build",
21-
"deploy": "gh-pages -d storybook-static"
24+
"deploy": "gh-pages -d storybook-static",
25+
"prepublishOnly": "npm run build"
2226
},
2327
"husky": {
2428
"hooks": {
@@ -46,7 +50,7 @@
4650
"bugs": {
4751
"url": "https://github.com/amareshsm/react-spinner-css/issues"
4852
},
49-
"homepage": "https://github.com/amareshsm/react-spinner-css#readme",
53+
"homepage": "https://amareshsm.github.io/react-spinner-css/",
5054
"devDependencies": {
5155
"@babel/core": "^7.10.5",
5256
"@babel/preset-env": "^7.10.4",
@@ -57,6 +61,7 @@
5761
"babel-core": "^7.0.0-bridge.0",
5862
"babel-jest": "^26.1.0",
5963
"babel-loader": "^8.1.0",
64+
"coveralls": "^3.1.0",
6065
"eslint": "^7.5.0",
6166
"eslint-config-prettier": "^6.11.0",
6267
"eslint-config-standard": "^14.1.1",

src/Components/Loader1/style.css

Lines changed: 4 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,10 @@
1-
* {
2-
padding: 0px;
3-
margin: 0px;
4-
box-sizing: border-box;
5-
}
6-
7-
.loader-div {
8-
display: flex;
9-
flex-direction: column;
10-
justify-content: center;
11-
align-items: center;
12-
height: 300px;
13-
width: 380px;
14-
margin: 8px;
15-
border-radius: 4px;
16-
}
17-
.loader-div.one {
18-
background-color: lightyellow;
19-
}
20-
211
.loader1 {
22-
width: 90px;
23-
height: 90px;
24-
border-top: 4px solid blue;
2+
width: 60px;
3+
height: 60px;
4+
border-top: 4px solid black;
255
border-radius: 100%;
266
animation: spin 2s linear infinite;
7+
box-sizing: border-box;
278
}
289

2910
@keyframes spin {

src/Components/Loader10/Loader.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import React from 'react'
2+
import styles from './style.css'
3+
const Loader10 = (props) => (
4+
<>
5+
<style>{`${styles}`}</style>
6+
<div className="loader-div ten">
7+
<div className="loader10">
8+
<div className="circle-1"></div>
9+
<div className="circle-2"></div>
10+
</div>
11+
</div>
12+
</>
13+
)
14+
15+
export default Loader10
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import React from 'react'
2+
import renderer from 'react-test-renderer'
3+
import { Loader10 } from '.'
4+
it('renders correctly', () => {
5+
const tree = renderer.create(<Loader10 />).toJSON()
6+
expect(tree).toMatchSnapshot()
7+
})

0 commit comments

Comments
 (0)