hackoon
Version:
Immunefi Hackoon CLI
15 lines (14 loc) • 636 B
JavaScript
import { Text, Box } from "ink";
import React from "react";
import TextInput from "ink-text-input";
export default 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: () => { },
}) })));
}