mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-15 16:23:25 +01:00
20 lines
450 B
TypeScript
20 lines
450 B
TypeScript
import classNames from 'classnames';
|
|
import type { ReactNode } from 'react';
|
|
|
|
interface Props {
|
|
children: ReactNode;
|
|
}
|
|
|
|
export function FormattedError({ children }: Props) {
|
|
return (
|
|
<pre
|
|
className={classNames(
|
|
'font-mono text-sm w-full select-auto cursor-text bg-surface-highlight p-3 rounded',
|
|
'whitespace-pre-wrap border border-danger border-dashed overflow-x-auto',
|
|
)}
|
|
>
|
|
{children}
|
|
</pre>
|
|
);
|
|
}
|