Skip to content

Commit d51ef0e

Browse files
committed
Update UI styles
1 parent f7f5a32 commit d51ef0e

File tree

2 files changed

+44
-57
lines changed

2 files changed

+44
-57
lines changed

src/App.css

+15-23
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.App {
2-
text-align: center;
2+
position: relative;
33
height: 100vh;
44
}
55

@@ -92,30 +92,9 @@ button:disabled {
9292
height: 100vh;
9393
}
9494

95-
.mainContainer {
96-
height: 100vh;
97-
display: flex;
98-
flex-direction: row;
99-
justify-content: flex-start;
100-
}
101-
102-
.sidebar {
103-
display: flex;
104-
flex-direction: column;
105-
justify-content: space-between;
106-
max-width: 100px;
107-
padding-top: 12px;
108-
padding-bottom: 12px;
109-
padding-left: 6px;
110-
padding-right: 6px;
111-
background-color: rgba(4, 217, 217, 0.1);
112-
}
113-
11495
.content {
11596
display: flex;
116-
flex-direction: column;
117-
height: 100vh;
118-
width: 100%;
97+
flex-direction: row;
11998
}
12099

121100
.header {
@@ -133,10 +112,23 @@ button:disabled {
133112
}
134113

135114
.editor {
115+
display: flex;
116+
margin-left: 50px;
136117
height: 100vh;
137118
}
138119

139120
.logo {
140121
width: 50px;
141122
border-radius: 8px;
123+
}
124+
125+
.infoButton {
126+
position: absolute;
127+
left: 12px;
128+
bottom: 12px;
129+
z-index: 100;
130+
}
131+
132+
.infoContent {
133+
text-align: center;
142134
}

src/App.tsx

+29-34
Original file line numberDiff line numberDiff line change
@@ -17,55 +17,50 @@ const App: React.FC = () => {
1717

1818
return (
1919
<div className="App">
20+
<div className='infoButton'>
21+
<button onClick={() => setInfoModalOpen(true)}><Info fontSize={24} /></button>
22+
</div>
2023
{isLoading ? <Loader /> : null}
2124
<Modal show={infoModalOpen} onClose={() => setInfoModalOpen(false)}>
22-
<>
25+
<div className='infoContent'>
2326
<h1>Open source UI for the FHIRPath expression</h1>
2427
<p><a href="https://github.com/projkov/fhirpath-ui" target="_blank" rel="noreferrer">GitHub Repo</a></p>
2528
<p>Developed by <a href="https://github.com/projkov" target="_blank" rel="noreferrer">Pavel Rozhkov</a></p>
2629
<p><a href="https://github.com/beda-software/fhirpath-py" target="_blank" rel="noreferrer">FHIRPath</a> engine developed by <a href="https://beda.software" target="_blank" rel="noreferrer">Beda Software</a></p>
27-
</>
30+
</div>
2831
</Modal>
29-
<div className='mainContainer'>
30-
<div className='sidebar'>
31-
<img src={logo} alt="Logo" className='logo' />
32-
<button onClick={() => setInfoModalOpen(true)}><Info fontSize={24} /></button>
32+
<div className='header'>
33+
<img src={logo} alt="Logo" className='logo' />
34+
<div className='searchBlock'>
35+
<input className="input" type="url" value={url} onChange={handleUrlChange} placeholder='You can paste the URL to get the FHIR Resource' />
3336
</div>
34-
<div className='content'>
35-
<div className='header'>
36-
<div className='searchBlock'>
37-
<input className="input" type="url" value={url} onChange={handleUrlChange} placeholder='You can paste the URL to get the FHIR Resource' />
38-
</div>
39-
<div className="buttonsBlock">
40-
<button onClick={handleFetch} disabled={!isGetResourceActive}><FileArrowDown fontSize={24} /></button>
41-
<button onClick={handleExecute} disabled={!isExecuteActive}><Play fontSize={24} /></button>
42-
<button onClick={handleShare} disabled={!isShareActive}><ShareFat fontSize={24} /></button>
43-
</div>
37+
<div className="buttonsBlock">
38+
<button onClick={handleFetch} disabled={!isGetResourceActive}><FileArrowDown fontSize={24} /></button>
39+
<button onClick={handleExecute} disabled={!isExecuteActive}><Play fontSize={24} /></button>
40+
<button onClick={handleShare} disabled={!isShareActive}><ShareFat fontSize={24} /></button>
41+
</div>
42+
</div>
43+
<div className='editor'>
44+
<Allotment defaultSizes={[550, 250]}>
45+
<div className='editorWrapper'>
46+
<Editor height="100vh" defaultLanguage="json" value={resource} onChange={(value) => setResource(value as string)} options={{ formatOnPaste: true, formatOnType: true }} />
4447
</div>
45-
<div className='editor'>
46-
<Allotment defaultSizes={[550, 250]}>
48+
<div style={{ height: '100vh' }}>
49+
<Allotment defaultSizes={[100, 300]} vertical>
4750
<div className='editorWrapper'>
48-
<Editor height="100vh" defaultLanguage="json" value={resource} onChange={(value) => setResource(value as string)} options={{ formatOnPaste: true, formatOnType: true }} />
51+
<Editor defaultLanguage="ruby" value={expression} onChange={(value) => setExpression(value as string)} options={{ formatOnPaste: true, formatOnType: true }} />
4952
</div>
50-
<div style={{ height: '100vh' }}>
51-
<Allotment defaultSizes={[100, 300]} vertical>
52-
<div className='editorWrapper'>
53-
<Editor defaultLanguage="ruby" value={expression} onChange={(value) => setExpression(value as string)} options={{ formatOnPaste: true, formatOnType: true }} />
54-
</div>
55-
<div className='editorWrapper'>
56-
<Editor defaultLanguage="json" value={result} options={{
57-
formatOnPaste: true,
58-
formatOnType: true,
59-
readOnly: true,
60-
}} />
61-
</div>
62-
</Allotment>
53+
<div className='editorWrapper'>
54+
<Editor defaultLanguage="json" value={result} options={{
55+
formatOnPaste: true,
56+
formatOnType: true,
57+
readOnly: true,
58+
}} />
6359
</div>
6460
</Allotment>
6561
</div>
66-
</div>
62+
</Allotment>
6763
</div>
68-
6964
</div>
7065
);
7166
};

0 commit comments

Comments
 (0)