Skip to content

Commit

Permalink
Remove information modal
Browse files Browse the repository at this point in the history
  • Loading branch information
projkov committed Sep 29, 2024
1 parent 6159e8b commit 5aae018
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 26 deletions.
18 changes: 7 additions & 11 deletions src/App.css
Original file line number Diff line number Diff line change
Expand Up @@ -114,22 +114,18 @@ button:disabled {

.editor {
display: flex;
margin-left: 50px;
height: 100vh;
height: 85vh;
}

.logo {
width: 50px;
border-radius: 8px;
}

.infoButton {
position: absolute;
left: 12px;
bottom: 12px;
z-index: 100;
}

.infoContent {
text-align: center;
.footer {
background-color: #f4f8fb;
height: 8vh;
display: flex;
justify-content: center;
align-items: center;
}
20 changes: 5 additions & 15 deletions src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
import React, { useState } from 'react';
import React from 'react';
import './App.css';
import { useFHIRPathUI } from './hooks';
import Editor from '@monaco-editor/react';
import { Allotment } from "allotment";
import "allotment/dist/style.css";
import { Play, ShareFat, FileArrowDown, Info } from "@phosphor-icons/react";
import { Play, ShareFat, FileArrowDown } from "@phosphor-icons/react";
import Loader from './components/loader';
import { Modal } from './components/Modal';
import logo from './assets/logo.png';
import { ToastContainer } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
Expand All @@ -16,22 +15,10 @@ const App: React.FC = () => {
const { url, handleUrlChange, handleFetch,
resource, expression, setExpression, setResource,
handleExecute, result, handleShare, isLoading, isExecuteActive, isGetResourceActive, isShareActive } = useFHIRPathUI();
const [infoModalOpen, setInfoModalOpen] = useState<boolean>(false);

return (
<div className="App">
<div className='infoButton'>
<button onClick={() => setInfoModalOpen(true)}><Info fontSize={24} /></button>
</div>
{isLoading ? <Loader /> : null}
<Modal show={infoModalOpen} onClose={() => setInfoModalOpen(false)}>
<div className='infoContent'>
<h1>Open source UI for the FHIRPath expression</h1>
<p><a href="https://github.com/projkov/fhirpath-ui" target="_blank" rel="noreferrer">GitHub Repo</a></p>
<p>Developed by <a href="https://github.com/projkov" target="_blank" rel="noreferrer">Pavel Rozhkov</a></p>
<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>
</div>
</Modal>
<div className='header'>
<img src={logo} alt="Logo" className='logo' />
<div className='searchBlock'>
Expand Down Expand Up @@ -62,6 +49,9 @@ const App: React.FC = () => {
</div>
</Allotment>
</div>
<div className='footer'>
<p><a href="https://github.com/projkov/fhirpath-ui" target="_blank" rel="noopener noreferrer">Source Code</a></p>
</div>
<ToastContainer />
</div>
);
Expand Down

0 comments on commit 5aae018

Please sign in to comment.