import Rating from '..';
import React from 'react';
import ReactDOM from 'react-dom';

const starMap = {
  1: 'Bad',
  2: 'OK',
  3: 'Good',
  4: 'Great',
  5: 'Perfect',
};

ReactDOM.render(
  <div>
    <Rating
      id="rating-a11y-1"
      defaultValue={3}
      // @ts-ignore
      readAs={val => starMap[val]}
      onChange={val => console.log('change:', val)}
      onHoverChange={val => console.log('hover:', val)}
    />
  </div>,
  document.getElementById('rating-demo-5'),
);
