|
1 | 1 | import React, { useEffect, useState, useRef } from 'react';
|
| 2 | +import style from '../../components/BrowserWindow/BrowserWindow.module.css'; |
2 | 3 |
|
3 |
| -const BasicEditor: React.FC= () => { |
| 4 | +const BasicEditor= () => { |
4 | 5 | const [checker, setChecker] = useState({ html: true, css: false, js: false,settings:false,fontSize:10,fontColor:false,backcolor:false });
|
5 | 6 | const [html, setHtml] = useState("");
|
6 | 7 | const [css, setCss] = useState("");
|
@@ -80,7 +81,24 @@ const BasicEditor: React.FC= () => {
|
80 | 81 | <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>
|
81 | 82 | <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>
|
82 | 83 | </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> |
84 | 102 | </div>
|
85 | 103 | );
|
86 | 104 | }
|
|
0 commit comments