aura-ai
Version:
AI-powered marketing strategist CLI tool for developers
28 lines (24 loc) • 618 B
JSX
import React from 'react'
import { Box, Text } from 'ink'
import SelectInput from 'ink-select-input'
/**
* Simple confirmation component using SelectInput
*/
const SimpleConfirm = ({ message, onConfirm }) => {
const handleSelect = item => {
onConfirm(item.value === 'yes')
}
const items = [
{ label: 'Yes', value: 'yes' },
{ label: 'No', value: 'no' },
]
return (
<Box flexDirection='column'>
<Box marginBottom={1}>
<Text color='yellow'>{message}</Text>
</Box>
<SelectInput items={items} onSelect={handleSelect} />
</Box>
)
}
export default SimpleConfirm