Files
pdfer/components/Select.tsx
2021-02-25 00:35:03 +01:00

19 lines
425 B
TypeScript

import React from 'react'
export default (props) => {
const { options = [] } = props
return (
<label>
{props.text}
<select className={props.name} onChange={props.onchange.bind(null, props.name)} value={props.value}>
{options.map((option) => (
<option value={option.value} key={option.value}>
{option.name}
</option>
))}
</select>
</label>
)
}