mirror of
https://github.com/phuoc-ng/csslayout.git
synced 2025-10-23 18:56:29 +02:00
26 lines
649 B
TypeScript
26 lines
649 B
TypeScript
import * as React from 'react';
|
|
import { Window } from '@1milligram/design';
|
|
|
|
import { Code } from '../components/Code';
|
|
|
|
interface BrowserFrameProps {
|
|
css: string;
|
|
html: string;
|
|
}
|
|
|
|
const BrowserFrame: React.FC<BrowserFrameProps> = ({ children, css, html }) => {
|
|
return (
|
|
<Window>
|
|
<div className="demo__html">
|
|
<Code className="lang-html">{html}</Code>
|
|
</div>
|
|
<div className="demo__css">
|
|
<Code className="lang-css">{css}</Code>
|
|
</div>
|
|
<div className="demo__live">{children}</div>
|
|
</Window>
|
|
);
|
|
};
|
|
|
|
export default BrowserFrame;
|