mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-13 22:42:38 -05:00
22 lines
501 B
JavaScript
22 lines
501 B
JavaScript
import React from "react"
|
|
import { Dropdown } from "semantic-ui-react"
|
|
|
|
const YearDropdown = ({ value, onChange, startYear = 2018 }) => {
|
|
const options = []
|
|
for (let index = startYear; index <= new Date().getFullYear(); index++) {
|
|
options.push({ key: index, text: index, value: index })
|
|
}
|
|
return (
|
|
<Dropdown
|
|
clearable
|
|
value={value}
|
|
onChange={onChange}
|
|
selection
|
|
style={{ width: "270px" }}
|
|
options={options}
|
|
/>
|
|
)
|
|
}
|
|
|
|
export default YearDropdown
|