0.0.11 • Published 6 years ago
react-native-lottie-rating v0.0.11
react-native-lottie-rating
The animation is also available here.
Installation
yarn add lottie-react-native react-native-lottie-rating
lottie-react-native
may require native linking, see package repository for more details.
Definition
type rating = {
disabled?: boolean, // default = false
max?: number, // default = 5
onRate: Function, // default = rating => null
size?: number, // default = 36
src?: any, // default = require('./animation.json')
value?: number // default = 0
};
Example
import React from 'react';
import { View } from 'react-native';
import Rating from 'react-native-lottie-rating';
const Example = () => (
<View style={{ alignItems: 'center', flex: 1, justifyContent: 'center' }}>
<Rating onRate={rating => console.log(rating)} />
</View>
);
export default Example;