import React from 'react'
import PropTypes from 'prop-types'

export const SelectItem = React.forwardRef(({ children, value }, ref) => (
  <option value={value} ref={ref}>
    {children}
  </option>
))

SelectItem.displayName = 'SelectItem'

SelectItem.propTypes = {
  /**
   * Label text of the option.
   */
  children: PropTypes.string.isRequired,
  /**
   * The value of the option
   */
  value: PropTypes.string.isRequired
}
