import React from 'react' ; import { Rating as PicassoRating , RatingProps } from '@toptal/picasso' ; import FieldWrapper , { FieldProps } from '../FieldWrapper' ; export type Props = RatingProps & FieldProps < RatingProps [ 'value' ] > ; export const Rating = ( props ) => ( < FieldWrapper < RatingProps > { ... props } type = 'number' > { ( inputProps ) => { return < PicassoRating { ... inputProps } / > ; } } < /FieldWrapper>); Rating . defaultProps = { } ; Rating . displayName = 'Rating' ; export default Rating ;