Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ node_modules
jspm_packages
.npm
.node_repl_history
Example/Counter.js
lib
21 changes: 13 additions & 8 deletions Example/Example.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';
import Counter from 'react-native-counter';
import React, { Component } from "react";
import { StyleSheet, Text, View } from "react-native";
import Counter from "./Counter";

export default class Example extends Component {
render() {
return (
<View style={styles.container}>
<Counter end={1000} />
<Counter
end={1000}
template={value => `Hello ${value.toFixed(2)}`}
style={val => (val > 500 ? { color: "red" } : {})}
eaysing='cubicInOut'
/>
</View>
);
}
Expand All @@ -15,8 +20,8 @@ export default class Example extends Component {
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
justifyContent: "center",
alignItems: "center",
backgroundColor: "#F5FCFF"
}
});
Loading