Skip to content
Snippets Groups Projects
BatchParametersComponent.js 507 B
Newer Older
Gareth Hughes's avatar
Gareth Hughes committed
import React from "react";

const handleFocus = (event) => event.target.select();

export default function BatchParametersComponent(props) {

    const { param, setParam, label } = props;

    return (
            <table width="50%">
                <tr>
                    <td colSpan={200}><label>{label}</label></td>
                    <td align="right"><input value={param} onChange={evt => setParam(evt.target.value)} onFocus={handleFocus}/></td>
                </tr>
            </table>
Gareth Hughes's avatar
Gareth Hughes committed
    );

}