@letanure/resend-cli
Version:
A command-line interface for Resend email API
20 lines • 906 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { Alert } from '@inkjs/ui';
import { Box, useInput } from 'ink';
import { Layout } from './layout.js';
/**
* Generic result screen component that displays a success or error message
* and waits for user input to continue
*
* @param type - Type of result: 'success' or 'error'
* @param message - Message to display
* @param onContinue - Callback when user presses any key to continue
* @param headerText - Header text for the layout
*/
export const ResultScreen = ({ type, message, onContinue, headerText }) => {
useInput((_input, _key) => {
onContinue();
});
return (_jsx(Layout, { headerText: headerText, footerText: "Press any key to continue...", children: _jsx(Box, { flexDirection: "column", marginTop: 1, children: _jsx(Alert, { variant: type, children: message }) }) }));
};
//# sourceMappingURL=ResultScreen.js.map