UNPKG

hackoon

Version:
13 lines (12 loc) 610 B
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);