message: refactor(components): update StarRates
diff: @@ -5,6 +5,7 @@ export interface StarRatesProps {
  rate?: number
  width?: number
  gutter?: number
  + style?: React.CSSProperties
  }
  export default class StarRates extends React.PureComponent<StarRatesProps> {
  @@ -14,12 +15,19 @@ export default class StarRates extends React.PureComponent<StarRatesProps> {
  const width = Number(this.props.width) || 20
  const gutter = Number(this.props.gutter) || 5
  + const style = {
  + width: width * 5 + gutter * 4,
  + height: width,
  + ...(this.props.style || {})
  + }
  +
  return (
  - <div className={className}>
  + <div className={className} style={style}>
  {Array.from(Array(5)).map((_, i) => (
  <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 426.67 426.67'
  key={i + rate}
  width={width}
  + height={width}
  style={{ marginRight: i === 4 ? '' : gutter }}
  >
  <path fill={i < rate ? '#FAC917' : '#d1d8de'} d='M213.33 10.44l65.92 133.58 147.42 21.42L320 269.4l25.17 146.83-131.84-69.32-131.85 69.34 25.2-146.82L0 165.45l147.4-21.42' />
  