feat: add keyboard usability to end user survey experience

feat: add keyboard usability to end user survey experience
This commit is contained in:
Johannes
2023-10-08 13:37:02 +05:30
committed by GitHub
11 changed files with 175 additions and 34 deletions

View File

@@ -28,9 +28,9 @@ export const RatingResponse: React.FC<RatingResponseProps> = ({ scale, range, an
const stars: any = [];
for (let i = 0; i < range; i++) {
if (i < parseInt(answer)) {
stars.push(<StarIcon className="h-7 text-yellow-400" />);
stars.push(<StarIcon key={i} className="h-7 text-yellow-400" />);
} else {
stars.push(<StarIcon className="h-7 text-gray-300" />);
stars.push(<StarIcon key={i} className="h-7 text-gray-300" />);
}
}
return <div className="flex">{stars}</div>;