Skip to content

Commit 81dc984

Browse files
committed
Updated
1 parent d8a1147 commit 81dc984

File tree

9 files changed

+9633
-0
lines changed

9 files changed

+9633
-0
lines changed

.gitignore

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Logs
2+
logs
3+
*.log
4+
npm-debug.log*
5+
yarn-debug.log*
6+
yarn-error.log*
7+
8+
# Runtime data
9+
pids
10+
*.pid
11+
*.seed
12+
*.pid.lock
13+
14+
# Directory for instrumented libs generated by jscoverage/JSCover
15+
lib-cov
16+
17+
# Coverage directory used by tools like istanbul
18+
coverage
19+
20+
# nyc test coverage
21+
.nyc_output
22+
23+
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24+
.grunt
25+
26+
# Bower dependency directory (https://bower.io/)
27+
bower_components
28+
29+
# node-waf configuration
30+
.lock-wscript
31+
32+
# Compiled binary addons (http://nodejs.org/api/addons.html)
33+
build/Release
34+
35+
# Dependency directories
36+
node_modules/
37+
jspm_packages/
38+
39+
# Typescript v1 declaration files
40+
typings/
41+
42+
# Optional npm cache directory
43+
.npm
44+
45+
# Optional eslint cache
46+
.eslintcache
47+
48+
# Optional REPL history
49+
.node_repl_history
50+
51+
# Output of 'npm pack'
52+
*.tgz
53+
54+
# Yarn Integrity file
55+
.yarn-integrity
56+
57+
# yarn log
58+
.yarn-error.log
59+
60+
# dotenv environment variables file
61+
.env
62+
63+
# production
64+
/build
65+
/dist
66+
67+
# cache
68+
.cache/
69+
70+
# editor
71+
.vscode

README.md

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
2+
# react-native-background-shapes
3+
4+
[![NPM version](https://badge.fury.io/js/react-native-backgroud-shapes.svg)](https://npmjs.org/package/react-native-backgroud-shapes) [![GitHub license](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](https://raw.githubusercontent.com/kevoj/react-native-backgroud-shapes/master/LICENSE)
5+
6+
> Beautiful backgrounds shapes to React Native based in flex
7+
8+
### Examples
9+
![Imgur](https://imgur.com/Dzkd0zB.jpg)
10+
![Imgur](https://imgur.com/i7YfOxK.jpg)
11+
![Imgur](https://imgur.com/m2f78nl.jpg)
12+
![Imgur](https://imgur.com/dNwUJV2.jpg)
13+
14+
### Installation
15+
**Yarn**
16+
```bash
17+
yarn add react-native-background-shapes
18+
```
19+
**Npm**
20+
```bash
21+
npm i react-native-background-shapes
22+
```
23+
### Usage
24+
```javascript
25+
import react from "react";
26+
import {View} from "react-native";
27+
import {Shapes} from "react-native-background-shapes";
28+
29+
export const example () => {
30+
return (
31+
<View>
32+
<Shapes />
33+
</View>
34+
);
35+
}
36+
```
37+
### Options
38+
39+
```javascript
40+
// Basic
41+
<Shapes />
42+
// Advance
43+
<Shapes
44+
primaryColor="#416DF8"
45+
secondaryColor="#2F53D5"
46+
height={3}
47+
borderRadius={20}
48+
figures={[
49+
{name: 'circle', position: 'center', size: 60},
50+
{name: 'donut', position: 'flex-start', axis: 'top', size: 80},
51+
{name: 'circle', position: 'center', axis: 'right', size: 100},
52+
]}
53+
/>
54+
```
55+
**primaryColor**: String, HEX color.
56+
**secondaryColor**: String, HEX color.
57+
**height**: Number, 1 = full screen, default (3.5)
58+
**borderRadius**: Number, default 30
59+
**figures**: Array
60+
* **name**: String = "circle","donut, "triangle", "diamondNarrow", "cutDiamond"
61+
* **position**: String = "flex-start", "center, "flex-end", "baseline", "stretch"
62+
* **axis**: String = "top", "right, "bottom", "left"
63+
64+
## License
65+
66+
MIT © [Leonardo Rico](https://github.com/kevoj/react-native-background-shapes/blob/master/LICENSE)

package.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"name": "react-native-background-shapes",
3+
"version": "0.1",
4+
"description": "Beautiful backgrounds shapes to React Native based in flex",
5+
"main": "dist/lib/index.js",
6+
"scripts": {
7+
"start": "./node_modules/.bin/parcel src/docs/index.html",
8+
"build": "./node_modules/.bin/webpack --mode=production",
9+
"build:docs": "./node_modules/.bin/parcel build src/docs/index.js -d ./dist/docs && cp src/docs/index.html dist/docs/index.html"
10+
},
11+
"repository": {
12+
"type": "git",
13+
"url": "git+https://github.com/kevoj/react-webpack-component.git"
14+
},
15+
"keywords": [
16+
"React",
17+
"Component",
18+
"webpack",
19+
"webpack 4",
20+
"react-webpack"
21+
],
22+
"author": "Leonardo Rico Guevara - https://github.com/kevoj",
23+
"license": "MIT",
24+
"dependencies": {
25+
"react": "^16.12.0",
26+
"react-dom": "^16.12.0",
27+
"react-native": "^0.61.5"
28+
},
29+
"peerDependencies": {
30+
"react": "^16.2.0",
31+
"react-dom": "^16.2.0",
32+
"react-native": "^0.61.5"
33+
},
34+
"devDependencies": {
35+
"@babel/core": "^7.8.3",
36+
"@babel/preset-env": "^7.8.3",
37+
"@babel/preset-react": "^7.8.3",
38+
"babel-loader": "^8.0.0-beta",
39+
"babel-plugin-transform-async-to-generator": "^6.24.1",
40+
"babel-preset-env": "^1.7.0",
41+
"babel-preset-react": "^6.24.1",
42+
"babel-preset-stage-2": "^6.24.1",
43+
"parcel-bundler": "^1.12.4",
44+
"webpack": "^4.41.5",
45+
"webpack-cli": "^3.3.10",
46+
"webpack-node-externals": "^1.7.2"
47+
}
48+
}

src/docs/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
7+
<title>my UI</title>
8+
</head>
9+
10+
<body>
11+
<noscript>
12+
You need to enable JavaScript to run this app.
13+
</noscript>
14+
<div id="root"></div>
15+
<script src="./index.js"></script>
16+
</body>
17+
18+
</html>

src/docs/index.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import React from "react";
2+
import ReactDOM from "react-dom";
3+
import { Shapes } from "../lib/Shapes";
4+
5+
const App = () => (
6+
<div>
7+
<Shapes />
8+
</div>
9+
);
10+
11+
ReactDOM.render(<App />, document.getElementById("root"));

0 commit comments

Comments
 (0)