UNPKG

@wix/design-system

Version:

@wix/design-system

30 lines (27 loc) 1.06 kB
### dataHook - type: string - description: Applies a data-hook HTML attribute that can be used in the tests ### className - type: string - description: Specifies a CSS class name to be appended to the component’s root element. - internal ### readOnly - type: boolean - description: Specifies whether the rating bar is in read only mode - default: false ### descriptionValues - type: [string, string, (string | undefined)?, (string | undefined)?, (string | undefined)?] - description: Specifies the rate value descriptions’ texts. The array length must match the maxValue prop number (5 by default). ### maxValue - type: 2 | 3 | 4 | 5 - description: Specifies the maximum rate value. - default: 5 ### value - type: 0 | 1 | 2 | 3 | 4 | 5 - description: Specifies the selected rate. `0` indicates undefined rating. `readOnly` mode value cannot be `0`. ### onChange - type: (rating: number) => void - description: Defines a handler that is called whenever a rating changes. ##### Signature: function(rating: number) => void * `rating`: 1 | 2 | 3 | 4 | 5