hackoon
Version:
Immunefi Hackoon CLI
13 lines (12 loc) • 610 B
JavaScript
import { Box, Text } from "ink";
import React from "react";
import TextInput from "ink-text-input";
function Input({ input, handleInputChange, handleSubmit, }) {
return (React.createElement(Box, { marginTop: 1 },
React.createElement(Box, { marginRight: 2 },
React.createElement(Text, null, "Enter your query:")),
React.createElement(TextInput, { value: input, onChange: (value) => handleInputChange({
target: { value },
}), onSubmit: (value) => handleSubmit({ target: { value }, preventDefault: () => { } }) })));
}
export default React.memo(Input);