mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 14:37:21 +01:00
make client own package (using create-react-app)
This commit is contained in:
17
client/src/Select.js
Normal file
17
client/src/Select.js
Normal file
@@ -0,0 +1,17 @@
|
||||
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)}
|
||||
>
|
||||
{options.map((option) => <option label={option.name} value={option.value} key={option.value}/>)}
|
||||
</select>
|
||||
</label>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user