import React from 'react'
import Icon from '../Icons/Icon'
import styles from './_review-stars.module.scss'
export type ReviewStarsProps = {
rating: number
className?: string
/** Optional prop to add a test id to the ReviewStars for QA testing */
qaTestId?: string
}
const ReviewStars = ({
rating,
className = '',
qaTestId = 'review-stars',
}: ReviewStarsProps): React.JSX.Element => {
const getStarIcon = (
index: number,
fullStars: number,
hasHalfStar: boolean,
): React.JSX.Element => {
if (index < fullStars) {
return