Skip to content

Commit 9b0cdf5

Browse files
author
Raymond Ottun
committed
docs: fixed docs
1 parent 3800516 commit 9b0cdf5

1 file changed

Lines changed: 35 additions & 24 deletions

File tree

web/components/Compile.jsx

Lines changed: 35 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -45,33 +45,44 @@ export const Compile = () => {
4545

4646
return (
4747
<div className='w-full'>
48-
<div className='my-4 flex space-x-4'>
49-
<label className='inline-block' htmlFor="examples">Examples</label>
50-
<select id='examples' className='inline-block'
51-
onChange={(e) => { changeTemplate(e) }}>
52-
{
53-
templates.map((template) => (
54-
<option key={template.name} value={template.name}>{template.label}</option>
55-
))
56-
}
57-
</select>
48+
<div style={{ display: "flex", padding: "10px 0", gap: "10px" }}>
49+
<div>
50+
<label htmlFor="examples">Example Templates</label>
51+
</div>
52+
<div>
53+
<select id='examples'
54+
onChange={(e) => { changeTemplate(e) }}>
55+
{
56+
templates.map((template) => (
57+
<option key={template.name} value={template.name}>{template.label}</option>
58+
))
59+
}
60+
</select>
61+
</div>
62+
5863
</div>
64+
<div style={{ display: 'flex', gap: "10px" }}>
65+
<div style={{ flex: 1 }}>
66+
<h3 style={{ padding: "8px 0" }}>Template</h3>
67+
<Editor
68+
height='70vh' theme='vs-dark'
69+
options={{ minimap: { enabled: false }, readOnly: false }}
70+
language={currTemplate}
71+
value={templates.find((template) => template.name === currTemplate).template}
72+
onChange={handleChange}
73+
/>
74+
</div>
5975

76+
<div style={{ flex: 1 }}>
77+
<h3 style={{ padding: "8px 0" }}>Result</h3>
78+
<Editor
79+
height='70vh' theme='vs-dark'
80+
options={{ minimap: { enabled: false }, readOnly: true, formatOnPaste: true, formatOnType: true, renderControlCharacters: false, renderWhitespace: 'none', renderFinalNewline: true, renderIndentGuides: true, renderLineHighlight: 'none', renderLineNumbers: 'off', renderValidationDecorations: 'off', scrollBeyondLastLine: false, wordWrap: 'on' }}
81+
language={currTemplate}
82+
value={content}
83+
/>
84+
</div>
6085

61-
<div style={{ display: 'flex' }}>
62-
<Editor
63-
height='70vh' theme='vs-dark'
64-
options={{ minimap: { enabled: false }, readOnly: false }}
65-
language={currTemplate}
66-
value={templates.find((template) => template.name === currTemplate).template}
67-
onChange={handleChange}
68-
/>
69-
<Editor
70-
height='70vh' theme='vs-dark'
71-
options={{ minimap: { enabled: false }, readOnly: true, formatOnPaste: true, formatOnType: true, renderControlCharacters: false, renderWhitespace: 'none', renderFinalNewline: true, renderIndentGuides: true, renderLineHighlight: 'none', renderLineNumbers: 'off', renderValidationDecorations: 'off', scrollBeyondLastLine: false, wordWrap: 'on' }}
72-
language={currTemplate}
73-
value={content}
74-
/>
7586
</div>
7687
</div>
7788
)

0 commit comments

Comments
 (0)