import React, { FC } from 'react'; import { Box, Text, Static, Color } from 'ink'; import { BoxPads, ErrorLabel } from '.'; export interface ErrorBoxProps { errMsg: string operation?: string permanent?: boolean } export const ErrorBox: FC = ({ errMsg: message, permanent, operation }) => { let body = ( {' '} { operation ? `${operation} ` : ''} {message} ) if (permanent !== true) return body; return ( { body } <> ) } export default ErrorBox;