import React, { Component } from 'react' import { View } from 'react-native' import { AirbnbRating, Rating } from 'react-native-ratings' import { RatingProps } from '../utils/PropTypes' import ErrorTip from './helper/ErrorTip' import getFieldDecorator from '../utils/getFieldDecorator' import Label from './helper/Label' export class SsRatingView extends Component { static defaultProps = { required: false, } private ratingCompleted = (nValue: number) => { const { onChange } = this.props onChange && onChange(nValue) } render() { const { label, required, initialValue, allowHalf } = this.props return ( ) } } export default class SsRating extends Component { private fieldDecorator: any static defaultProps = { required: false, } componentWillMount() { const { form, id, initialValue, rules } = this.props this.fieldDecorator = getFieldDecorator(form, id, initialValue, rules) } render() { const { label, required, form, id, onChange, initialValue, allowHalf } = this.props return ( {this.fieldDecorator( )} ) } }