Skip to content

Commit

Permalink
Add SVGExample + test + add to the readme
Browse files Browse the repository at this point in the history
  • Loading branch information
negativetwelve committed Aug 11, 2017
1 parent 1ffc097 commit 8c88097
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,6 @@ It also serves as a catalog for all react-native pacakges in the community.

## Packages

* [react-native-svg](https://github.com/react-native-community/react-native-svg)
* [react-native-ux-cam](https://github.com/negativetwelve/react-native-ux-cam)
* [react-native-video](https://github.com/react-native-community/react-native-video)
2 changes: 2 additions & 0 deletions js/components/PackagesView.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import React from 'react';
import {StyleSheet, View} from 'react-native';

// Packages
import SVGExample from '../examples/SVGExample';
import UXCamExample from '../examples/UXCamExample';
import VideoExample from '../examples/VideoExample';

Expand All @@ -16,6 +17,7 @@ const styles = StyleSheet.create({

export default () => (
<View style={styles.container}>
<SVGExample />
<UXCamExample />
<VideoExample />
</View>
Expand Down
17 changes: 17 additions & 0 deletions js/examples/SVGExample.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Libraries
import React from 'react';
import {StyleSheet, View} from 'react-native';
import SVG from 'react-native-svg';


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


// TODO(mark): We need to add a example components from react-native-svg.
export default () => (
<View />
);
14 changes: 14 additions & 0 deletions js/examples/__tests__/SVGExample.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Libraries
import 'react-native';
import React from 'react';
import Renderer from 'react-test-renderer';

// Components
import SVGExample from '../SVGExample';


it('renders correctly', () => {
const tree = Renderer.create(
<SVGExample />
);
});

0 comments on commit 8c88097

Please sign in to comment.