import React from "react";
import { StarRating as BaseStarRating } from "baseui/rating";

export interface RatingProps {
  overrides?: any;
  value?: number;
  numItems?: number;
  readOnly?: boolean;
  onChange?: (args: { value: number }) => any;
  size?: number;
}

/**
 * This is the `<Rating>` component <br />
 * Use this to gather rating data from the user
 */
const Rating: React.FC<RatingProps> = (props) => {
  const { numItems, size, onChange } = props;
  return (
    <BaseStarRating
      numItems={numItems}
      onChange={onChange}
      size={size}
      {...props}
    />
  );
};

export default Rating;
