All files / src/shared/StarRating GiveStarRating.types.ts

0% Statements 0/0
0% Branches 0/0
0% Functions 0/0
0% Lines 0/0

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20                                       
import { SxProps } from "@mui/material";
 
export type GiveStarRatingProps = {
  /**
   * 0-5. Fractional values are drawn as a partially filled star, so an average
   * like 4.3 reads correctly rather than rounding to 4.
   */
  value: number;
  /** Star glyph size in px. 16 everywhere in the review surfaces. */
  size?: number;
  /**
   * Turns the row into a radio group: each star becomes a button and clicking
   * one reports its 1-5 value. Omit for the read-only display.
   */
  onChange?: (value: number) => void;
  /** Accessible label. Defaults to "<value> out of 5 stars". */
  ariaLabel?: string;
  sx?: SxProps;
};