Skip to content

Commit a9f6af2

Browse files
rebuild output
1 parent 8d89f60 commit a9f6af2

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

src/pages/LiveEditor/BasicEditor.tsx

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import React, { useEffect, useState, useRef } from 'react';
2+
import style from '../../components/BrowserWindow/BrowserWindow.module.css';
23

3-
const BasicEditor: React.FC= () => {
4+
const BasicEditor= () => {
45
const [checker, setChecker] = useState({ html: true, css: false, js: false,settings:false,fontSize:10,fontColor:false,backcolor:false });
56
const [html, setHtml] = useState("");
67
const [css, setCss] = useState("");
@@ -80,7 +81,24 @@ const BasicEditor: React.FC= () => {
8081
<textarea style={{fontSize:`${checker.fontSize}pt`,color:checker.fontColor==false?"unset":checker.fontColor,background:checker.backcolor==false?"transparent":checker.backcolor}} className={checker.css ? 'editor_textarea_activate' : 'editor_textarea_deactivate'} value={css} placeholder="CSS" onChange={(e) => setCss(e.target.value)}></textarea>
8182
<textarea style={{fontSize:`${checker.fontSize}pt`,color:checker.fontColor==false?"unset":checker.fontColor,background:checker.backcolor==false?"transparent":checker.backcolor}} className={checker.js ? 'editor_textarea_activate' : 'editor_textarea_deactivate'} value={js} placeholder="JavaScript" onChange={(e) => setJs(e.target.value)}></textarea>
8283
</div>
83-
<iframe ref={iframeRef} className='output_container' id="preview"></iframe>
84+
<div className={style.browserWindow} style={{height:"35.3rem",flex:"1 0 30rem",marginTop:"1.3rem"}}>
85+
<div className={style.browserWindowHeader}>
86+
<div className={style.buttons}>
87+
<span className={style.dot} style={{background: '#f25f58'}} />
88+
<span className={style.dot} style={{background: '#fbbe3c'}} />
89+
<span className={style.dot} style={{background: '#58cb42'}} />
90+
</div>
91+
<div className={style.browserWindowMenuIcon}>
92+
<div>
93+
<span className={style.bar} />
94+
<span className={style.bar} />
95+
<span className={style.bar} />
96+
</div>
97+
</div>
98+
</div>
99+
100+
<iframe ref={iframeRef} className='output_container' id="preview"></iframe>
101+
</div>
84102
</div>
85103
);
86104
}

0 commit comments

Comments
 (0)