Repository: GeekyAnts/react-native-easy-grid
Branch: master
Commit: b0bbd4f0d241
Files: 20
Total size: 27.1 KB
Directory structure:
gitextract_rrhrs6nr/
├── .babelrc
├── .gitignore
├── .travis.yml
├── ChangeLog.md
├── Components/
│ ├── Col.js
│ ├── Grid.js
│ ├── Row.js
│ └── _tests_/
│ ├── Col.test.js
│ ├── Grid.test.js
│ ├── Row.test.js
│ └── __snapshots__/
│ ├── Col.test.js.snap
│ ├── Grid.test.js.snap
│ └── Row.test.js.snap
├── ISSUE_TEMPLATE.txt
├── LICENSE
├── README.md
├── Utils/
│ └── computeProps.js
├── index.d.ts
├── index.js
└── package.json
================================================
FILE CONTENTS
================================================
================================================
FILE: .babelrc
================================================
{
"presets": ["react-native"]
}
================================================
FILE: .gitignore
================================================
### OSX ###
.DS_Store
.AppleDouble
.LSOverride
# Icon must end with two \r
Icon
# Thumbnails
._*
# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
### Node ###
# Logs
logs
*.log
npm-debug.log*
# Runtime data
pids
*.pid
*.seed
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# node-waf configuration
.lock-wscript
# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules
jspm_packages
# Optional npm cache directory
.npm
# Optional REPL history
.node_repl_history
### Xcode ###
# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
## Build generated
build/
DerivedData/
## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata/
## Other
*.moved-aside
*.xccheckout
*.xcscmblueprint
### Android ###
# Built application files
*.apk
*.ap_
# Files for the Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# Intellij
*.iml
# Keystore files
*.jks
### Android Patch ###
gen-external-apklibs
================================================
FILE: .travis.yml
================================================
language: node_js
node_js:
- "6"
================================================
FILE: ChangeLog.md
================================================
# [0.2.0](https://github.com/GeekyAnts/react-native-easy-grid/releases/tag/v0.2.0)
### Updated Features
- Upgraded babel-jest to 23.2.0
- Upgraded babel-preset-react-native to 4
- Upgraded jest to 23.3.0
- Upgraded react to 16.4.1
- Upgraded react-native to 0.56.0
- Upgraded react-test-renderer to 16.4.1
### Bug Fixes
- Compatible with React Native 0.56, fixed `ReactNativePropRegistry` issue.
================================================
FILE: Components/Col.js
================================================
'use strict';
import React, {Component} from 'react';
import {View, TouchableOpacity, StyleSheet} from 'react-native';
import computeProps from '../Utils/computeProps';
export default class ColumnNB extends Component {
prepareRootProps() {
var flattenedStyle = StyleSheet.flatten(this.props.style)
var type = {
flexDirection: 'column',
flex: (this.props.size) ? this.props.size : (flattenedStyle && flattenedStyle.width) ? 0 : 1,
}
var defaultProps = {
style: type
}
return computeProps(this.props, defaultProps);
}
setNativeProps(nativeProps) {
this._root.setNativeProps(nativeProps);
}
render() {
if(this.props.onPress){
return(
<TouchableOpacity onPress={this.props.onPress}
{...this.prepareRootProps()}>
<View
ref={component => this._root = component}
{...this.props}
{...this.prepareRootProps()}
>{this.props.children}</View>
</TouchableOpacity>
);
}
else{
return(
<View
ref={component => this._root = component}
{...this.props}
{...this.prepareRootProps()}
>{this.props.children}</View>
);
}
}
}
================================================
FILE: Components/Grid.js
================================================
'use strict';
import React, {Component} from 'react';
import {View, TouchableOpacity} from 'react-native';
import computeProps from '../Utils/computeProps';
import Col from './Col';
import Row from './Row';
export default class GridNB extends Component {
prepareRootProps() {
var type = {
flex: 1,
flexDirection: this.ifRow() ? 'column' : 'row'
}
var defaultProps = {
style: type
}
return computeProps(this.props, defaultProps);
}
ifRow() {
var row = false;
React.Children.forEach(this.props.children, function (child) {
if(child && child.type == Row)
row = true;
})
return row;
}
setNativeProps(nativeProps) {
this._root.setNativeProps(nativeProps);
}
render() {
if(this.props.onPress){
return(
<TouchableOpacity onPress={this.props.onPress}>
<View
ref={component => this._root = component}
{...this.props}
{...this.prepareRootProps()}
>{this.props.children}</View>
</TouchableOpacity>
);
}
else{
return(
<View
ref={component => this._root = component}
{...this.props}
{...this.prepareRootProps()}
>{this.props.children}</View>
);
}
}
}
================================================
FILE: Components/Row.js
================================================
'use strict';
import React, {Component} from 'react';
import {View, TouchableOpacity, StyleSheet} from 'react-native';
import computeProps from '../Utils/computeProps';
export default class RowNB extends Component {
prepareRootProps() {
var flattenedStyle = StyleSheet.flatten(this.props.style)
var type = {
flexDirection: 'row',
flex: (this.props.size) ? this.props.size : (flattenedStyle && flattenedStyle.height) ? 0 : 1,
}
var defaultProps = {
style: type
}
return computeProps(this.props, defaultProps);
}
setNativeProps(nativeProps) {
this._root.setNativeProps(nativeProps);
}
render() {
if(this.props.onPress){
return(
<TouchableOpacity onPress={this.props.onPress}
{...this.prepareRootProps()}>
<View
ref={component => this._root = component}
{...this.props}
{...this.prepareRootProps()}
>{this.props.children}</View>
</TouchableOpacity>
);
}
else{
return(
<View
ref={component => this._root = component}
{...this.props}
{...this.prepareRootProps()}
>{this.props.children}</View>
);
}
}
}
================================================
FILE: Components/_tests_/Col.test.js
================================================
import "react-native";
import React from "react";
import Col from "../Col";
import renderer from "react-test-renderer";
test("renders correctly", () => {
const tree = renderer.create(<Col />).toJSON();
expect(tree).toMatchSnapshot();
});
================================================
FILE: Components/_tests_/Grid.test.js
================================================
import "react-native";
import React from "react";
import Grid from "../Grid";
import renderer from "react-test-renderer";
test("renders correctly", () => {
const tree = renderer.create(<Grid />).toJSON();
expect(tree).toMatchSnapshot();
});
================================================
FILE: Components/_tests_/Row.test.js
================================================
import "react-native";
import React from "react";
import Row from "../Row";
import renderer from "react-test-renderer";
test("renders correctly", () => {
const tree = renderer.create(<Row />).toJSON();
expect(tree).toMatchSnapshot();
});
================================================
FILE: Components/_tests_/__snapshots__/Col.test.js.snap
================================================
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders correctly 1`] = `
<View
style={
Object {
"flex": 1,
"flexDirection": "column",
}
}
/>
`;
================================================
FILE: Components/_tests_/__snapshots__/Grid.test.js.snap
================================================
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders correctly 1`] = `
<View
style={
Object {
"flex": 1,
"flexDirection": "row",
}
}
/>
`;
================================================
FILE: Components/_tests_/__snapshots__/Row.test.js.snap
================================================
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`renders correctly 1`] = `
<View
style={
Object {
"flex": 1,
"flexDirection": "row",
}
}
/>
`;
================================================
FILE: ISSUE_TEMPLATE.txt
================================================
<!--Hi! Thanks for trying out React Native Easy Grid!-->
<!--Take a look at these before heading towards creating an issue. Before you submit your issue, please make sure to check the following boxes by putting an x in the [ ] (don't: [x ], [ x], do: [x])-->
## I have gone through these following points
- [] Check latest documentation: https://docs.nativebase.io/
- [] Check for existing open/closed issues for a possible duplicate before creating a new issue: https://github.com/GeekyAnts/react-native-easy-grid/issues
- [] Use the latest React Native Easy Grid release
- [] Check examples from NativeBase KitchenSink https://github.com/GeekyAnts/NativeBase-KitchenSink
- [] For discussion purpose make use of NativeBase Slack: http://slack.nativebase.io/
- [] For queries related to theme, check [Theme Variables](https://docs.nativebase.io/docs/ThemeVariables.html) from Docs and live NativeBase Theme Editor http://nativebase.io/customizer/
## Issue Description
<!-- **DO** fill out the below form to give us a better idea about your environment and help us debug it quicker. Issues without the required details will mostly be closed.-->
### node, npm, package.json, xcode version
### Expected behaviour
### Actual behaviour
### Steps to reproduce
<!--
- Include code snippet and output screenshot.
- Include code snippet in preformatted mode (```code```) and not in screenshot.
- In case of lengthy code, then cut down into simple screen.
- Shared snippet should have import statement, parent component and the topmost component in which the component (for which issue is raised) is wrapped.
- Issue will be closed abruptly in case of buggy code snippet.
-->
### Is the bug present in both iOS and Android or in any one of them?
### Any other additional info which would help us debug the issue quicker.
<!-- In case of not following the above instructions, the issue will be closed abruptly -->
================================================
FILE: LICENSE
================================================
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
================================================
FILE: README.md
================================================
# React Native Easy Grid 🐵
 <br />
This is NOT-JUST-ANOTHER-GRID-LAYOUT library! We are trying to simplify flexbox with easier approach.
## About
React Native Easy Grid is part of the NativeBase ecosystem,
built by [GeekyAnts](https://geekyants.com?utm_source=github&utm_medium=opensource&utm_campaign=react-native-easy-grid).
We specialize in:
- [React Native Development](https://geekyants.com/hire-react-native-developers?utm_source=github&utm_medium=opensource&utm_campaign=react-native-easy-grid) -
Expert mobile app development
- [UI/UX Design Services](https://geekyants.com/service/ui-ux-design-services?utm_source=github&utm_medium=opensource&utm_campaign=react-native-easy-grid) -
Creating intuitive user interfaces
Need a custom layout solution? [Let's talk](https://geekyants.com/hire?utm_source=github&utm_medium=opensource&utm_campaign=react-native-easy-grid)
## Installation
```
npm install react-native-easy-grid --save
```
## Usage
### Include the components
```
import { Col, Row, Grid } from "react-native-easy-grid";
```
### 1. Two columns (50% and 50%)
```
<Grid>
<Col></Col>
<Col></Col>
</Grid>
```

> Note: If you don't assign the size property, it defaults to equal width (or height) with its siblings
### 2. Two rows
```
<Grid>
<Row></Row>
<Row></Row>
</Grid>
```

### 3. Two rows (75% and 25%)
```
<Grid>
<Row size={75}></Row>
<Row size={25}></Row>
</Grid>
```
This is exactly same as
```
<Grid>
<Row size={3}></Row>
<Row size={1}></Row>
</Grid>
```

> Same concept applies to `<Col />`
### 4. Three columns (33.33% each)
```
<Grid>
<Col></Col>
<Col></Col>
<Col></Col>
</Grid>
```

### 5. Three rows (50%, 25% and 25%)
```
<Grid>
<Row size={2}></Row>
<Row size={1}></Row>
<Row size={1}></Row>
</Grid>
```

### 6. Nested Layout or Grid
<table width="100" height="100">
<tr>
<td rowspan="2" bgcolor="red" width="50">1</td>
<td bgcolor="yellow" width="50" height="50">2</td>
</tr>
<tr>
<td bgcolor="blue">3</td>
</tr>
</table>
```
<Grid>
<Col>
<Text>1</Text>
</Col>
<Col>
<Row>
<Text>2</Text>
</Row>
<Row>
<Text>3</Text>
</Row>
</Col>
</Grid>
```

### 7. Fixed width and fluid width combination
```
<Grid>
<Col style={{ width: 40 }}>
<Text>Fixed width</Text>
</Col>
<Col>
<Text>Fluid width</Text>
</Col>
</Grid>
```

### 8. Fixed height and fluid height combination
```
<Grid>
<Row style={{ height: 40 }}>
<Text>Fixed width</Text>
</Row>
<Row>
<Text>Fluid width</Text>
</Row>
</Grid>
```
Do you think anything could be simpler than that? This repo is part of our bigger project called [NativeBase.io](http://nativebase.io). Do check that!
# Important note about usage with `<ScrollView />`
> Note: If you're using `<Row />` inside a `<ScrollView />`, the height of the <Row /> component would be flexible according to the content, though you can always apply the `height` styling.
================================================
FILE: Utils/computeProps.js
================================================
import React from "react";
import { StyleSheet } from "react-native";
import _ from 'lodash';
function computeProps(incomingProps, defaultProps) {
// External props has a higher precedence
var computedProps = {};
incomingProps = _.clone(incomingProps);
delete incomingProps.children;
var incomingPropsStyle = incomingProps.style;
delete incomingProps.style;
// console.log(defaultProps, incomingProps);
if (incomingProps) _.merge(computedProps, defaultProps, incomingProps);
else computedProps = defaultProps;
// Pass the merged Style Object instead
if (incomingPropsStyle) {
var computedPropsStyle = {};
computedProps.style = {};
if (Array.isArray(incomingPropsStyle)) {
_.forEach(incomingPropsStyle, style => {
if (typeof style == "number") {
_.merge(computedPropsStyle, StyleSheet.flatten(style));
} else {
_.merge(computedPropsStyle, style);
}
});
} else {
if (typeof incomingPropsStyle == "number") {
computedPropsStyle = StyleSheet.flatten(
incomingPropsStyle
);
} else {
computedPropsStyle = incomingPropsStyle;
}
}
_.merge(computedProps.style, defaultProps.style, computedPropsStyle);
}
// console.log("computedProps ", computedProps);
return computedProps;
};
export default computeProps;
================================================
FILE: index.d.ts
================================================
declare module "react-native-easy-grid" {
import {Component} from "react";
import {ViewProperties} from "react-native";
export interface RowProps extends ViewProperties {
size?: number
onPress?: () => void
}
export interface ColProps extends ViewProperties {
size?: number
onPress?: () => void
}
export class Grid extends Component<ViewProperties, any> {}
export class Row extends Component<RowProps, any> {}
export class Col extends Component<ColProps, any> {}
}
================================================
FILE: index.js
================================================
/* @flow */
'use strict';
import Row from './Components/Row';
import Grid from './Components/Grid';
import Col from './Components/Col';
export { Row, Grid, Col }
================================================
FILE: package.json
================================================
{
"name": "react-native-easy-grid",
"description": "Easy React Native Layout & Grid for the Dumb",
"version": "0.2.2",
"private": false,
"dependencies": {
"lodash": "^4.17.15"
},
"scripts": {
"test": "jest"
},
"jest": {
"preset": "react-native",
"modulePathIgnorePatterns": [
"acorn",
"core-js",
"isarray",
"wordwrap",
"convert-source-map",
"source-map",
"which",
"assert-plus",
"esprima",
"path-exists",
"glob",
"object-assign",
"repeating",
"supports-color",
"json-stable-stringify",
"minimist",
"duplexer2",
"readable-stream",
"extend",
"lru-cache",
"minimatch",
"async",
"punycode",
"clone",
"graceful-fs",
"strip-bom",
"through2",
"vinyl",
"camelcase"
]
},
"devDependencies": {
"babel-eslint": "^6.0.4",
"babel-jest": "23.2.0",
"babel-preset-react-native": "4.0.0",
"eslint": "^2.9.0",
"eslint-plugin-react": "^5.0.1",
"eslint-plugin-react-native": "^1.0.0",
"jest": "23.3.0",
"react": "16.4.1",
"react-native": "^0.60.4",
"react-test-renderer": "16.4.1"
},
"repository": {
"type": "git",
"url": "https://github.com/GeekyAnts/react-native-easy-grid.git"
},
"main": "index.js"
}
gitextract_rrhrs6nr/ ├── .babelrc ├── .gitignore ├── .travis.yml ├── ChangeLog.md ├── Components/ │ ├── Col.js │ ├── Grid.js │ ├── Row.js │ └── _tests_/ │ ├── Col.test.js │ ├── Grid.test.js │ ├── Row.test.js │ └── __snapshots__/ │ ├── Col.test.js.snap │ ├── Grid.test.js.snap │ └── Row.test.js.snap ├── ISSUE_TEMPLATE.txt ├── LICENSE ├── README.md ├── Utils/ │ └── computeProps.js ├── index.d.ts ├── index.js └── package.json
SYMBOL INDEX (19 symbols across 5 files)
FILE: Components/Col.js
class ColumnNB (line 8) | class ColumnNB extends Component {
method prepareRootProps (line 9) | prepareRootProps() {
method setNativeProps (line 25) | setNativeProps(nativeProps) {
method render (line 29) | render() {
FILE: Components/Grid.js
class GridNB (line 10) | class GridNB extends Component {
method prepareRootProps (line 11) | prepareRootProps() {
method ifRow (line 26) | ifRow() {
method setNativeProps (line 35) | setNativeProps(nativeProps) {
method render (line 39) | render() {
FILE: Components/Row.js
class RowNB (line 9) | class RowNB extends Component {
method prepareRootProps (line 10) | prepareRootProps() {
method setNativeProps (line 26) | setNativeProps(nativeProps) {
method render (line 30) | render() {
FILE: Utils/computeProps.js
function computeProps (line 5) | function computeProps(incomingProps, defaultProps) {
FILE: index.d.ts
type RowProps (line 6) | interface RowProps extends ViewProperties {
type ColProps (line 11) | interface ColProps extends ViewProperties {
class Grid (line 16) | class Grid extends Component<ViewProperties, any> {}
class Row (line 17) | class Row extends Component<RowProps, any> {}
class Col (line 18) | class Col extends Component<ColProps, any> {}
Condensed preview — 20 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (30K chars).
[
{
"path": ".babelrc",
"chars": 34,
"preview": "{\n \"presets\": [\"react-native\"]\n}\n"
},
{
"path": ".gitignore",
"chars": 1812,
"preview": "### OSX ###\n.DS_Store\n.AppleDouble\n.LSOverride\n\n# Icon must end with two \\r\nIcon\n\n\n# Thumbnails\n._*\n\n# Files that might "
},
{
"path": ".travis.yml",
"chars": 36,
"preview": "language: node_js\nnode_js:\n - \"6\"\n"
},
{
"path": "ChangeLog.md",
"chars": 401,
"preview": "# [0.2.0](https://github.com/GeekyAnts/react-native-easy-grid/releases/tag/v0.2.0)\n\n### Updated Features\n\n- Upgraded bab"
},
{
"path": "Components/Col.js",
"chars": 1230,
"preview": "'use strict';\n\nimport React, {Component} from 'react';\nimport {View, TouchableOpacity, StyleSheet} from 'react-native';\n"
},
{
"path": "Components/Grid.js",
"chars": 1325,
"preview": "'use strict';\n\nimport React, {Component} from 'react';\nimport {View, TouchableOpacity} from 'react-native';\nimport compu"
},
{
"path": "Components/Row.js",
"chars": 1301,
"preview": "'use strict';\n\nimport React, {Component} from 'react';\nimport {View, TouchableOpacity, StyleSheet} from 'react-native';\n"
},
{
"path": "Components/_tests_/Col.test.js",
"chars": 243,
"preview": "import \"react-native\";\nimport React from \"react\";\nimport Col from \"../Col\";\nimport renderer from \"react-test-renderer\";\n"
},
{
"path": "Components/_tests_/Grid.test.js",
"chars": 246,
"preview": "import \"react-native\";\nimport React from \"react\";\nimport Grid from \"../Grid\";\nimport renderer from \"react-test-renderer\""
},
{
"path": "Components/_tests_/Row.test.js",
"chars": 243,
"preview": "import \"react-native\";\nimport React from \"react\";\nimport Row from \"../Row\";\nimport renderer from \"react-test-renderer\";\n"
},
{
"path": "Components/_tests_/__snapshots__/Col.test.js.snap",
"chars": 174,
"preview": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`renders correctly 1`] = `\n<View\n style={\n Object {\n \"flex\""
},
{
"path": "Components/_tests_/__snapshots__/Grid.test.js.snap",
"chars": 171,
"preview": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`renders correctly 1`] = `\n<View\n style={\n Object {\n \"flex\""
},
{
"path": "Components/_tests_/__snapshots__/Row.test.js.snap",
"chars": 171,
"preview": "// Jest Snapshot v1, https://goo.gl/fbAQLP\n\nexports[`renders correctly 1`] = `\n<View\n style={\n Object {\n \"flex\""
},
{
"path": "ISSUE_TEMPLATE.txt",
"chars": 1927,
"preview": "<!--Hi! Thanks for trying out React Native Easy Grid!-->\n\n<!--Take a look at these before heading towards creating an is"
},
{
"path": "LICENSE",
"chars": 11357,
"preview": " Apache License\n Version 2.0, January 2004\n "
},
{
"path": "README.md",
"chars": 3687,
"preview": "# React Native Easy Grid 🐵\n. The extraction includes 20 files (27.1 KB), approximately 7.0k tokens, and a symbol index with 19 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.