Spaces:
Build error
Build error
File size: 560 Bytes
c6a6cfc |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
// src/components/code-playground/OutputDisplay.tsx
import React from 'react';
const OutputDisplay = ({ output, error }) => (
<div className="bg-gray-900 text-white p-4 rounded-lg h-48 overflow-auto">
{error ? (
<div className="text-red-400">
<strong>Error:</strong>
<pre className="mt-2 text-sm">{error}</pre>
</div>
) : output ? (
<pre className="text-sm">{output}</pre>
) : (
<div className="text-gray-400 text-sm">Code output will appear here...</div>
)}
</div>
);
export default OutputDisplay; |