Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Shuangzuan/react-native-square-view

A square view component for react native.
https://github.com/Shuangzuan/react-native-square-view

Last synced: about 1 month ago
JSON representation

A square view component for react native.

Awesome Lists containing this project

README

        

# react-native-square-view
A square view component for react native.

## Screen Shot

![Screen Shot](screen-shot.png)

## Installation

1. Run `npm install react-native-square-view --save` in your project directory.
2. Add `var SquareView = require('react-native-square-view');` to your code.

## Usage

```javascript
'use strict';

var React = require('react-native');
var {
AppRegistry,
StyleSheet,
Text,
View,
ScrollView
} = React;
var SquareView = require('react-native-square-view');

var SquareViewDemo = React.createClass({
render: function() {
return (

Parent w {'>'} h and direction is column:


A


A

Parent w {'>'} h and direction is row:


B


B


B

Parent w {'<'} h and direction is column:


C


C

Parent w {'<'} h and direction is row:


D


D


);
}
});

var styles = StyleSheet.create({
container: {
flex: 1
}
});

AppRegistry.registerComponent('SquareViewDemo', () => SquareViewDemo);
```

---

## License

Available under the MIT license. See the LICENSE file for more informatiion.