mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 14:37:21 +01:00
drop some types in
This commit is contained in:
@@ -1,12 +1,22 @@
|
||||
import React from 'react'
|
||||
|
||||
export default (props) => {
|
||||
const { options = [] } = props
|
||||
|
||||
export default function Select({
|
||||
name,
|
||||
text,
|
||||
value,
|
||||
onchange,
|
||||
options = [],
|
||||
}: {
|
||||
name: string
|
||||
text: string
|
||||
value: string
|
||||
onchange: () => void
|
||||
options: { name: string; value: string }[]
|
||||
}) {
|
||||
return (
|
||||
<label>
|
||||
{props.text}
|
||||
<select className={props.name} onChange={props.onchange.bind(null, props.name)} value={props.value}>
|
||||
{text}
|
||||
<select className={name} onChange={onchange.bind(null, name)} value={value}>
|
||||
{options.map((option) => (
|
||||
<option value={option.value} key={option.value}>
|
||||
{option.name}
|
||||
|
||||
Reference in New Issue
Block a user