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

const renderTimeMenuItems = list => {
  return list.map(({ label, value }) => { // eslint-disable-line
    return {
      value,
      label: value > 9 ? String(value) : `0${value}`,
    };
  });
};

ReactDOM.render(
  // @ts-ignore
  <TimePicker renderTimeMenuItems={renderTimeMenuItems} />,
  document.getElementById('time-picker-demo-7'),
);
