-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(templates): template whitespace, drilled load and auto scroll on …
…template output (#75) * chore(fix): implemented sticky footer to base Signed-off-by: Vinyl-Davyl <[email protected]> * feat: added fixed scroll feature on templates Signed-off-by: Vinyl-Davyl <[email protected]> * chore: fixes Signed-off-by: Vinyl-Davyl <[email protected]> * chore: fixes Signed-off-by: Vinyl-Davyl <[email protected]> * update: development Signed-off-by: Vinyl-Davyl <[email protected]> * dev: load state Signed-off-by: Vinyl-Davyl <[email protected]> * feat: drilled load state on all template sample render Signed-off-by: Vinyl-Davyl <[email protected]> * chore: fixes Signed-off-by: Vinyl-Davyl <[email protected]> --------- Signed-off-by: Vinyl-Davyl <[email protected]>
- Loading branch information
1 parent
f917061
commit 5b1f7ee
Showing
4 changed files
with
88 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,49 @@ | ||
import useAppStore from './store'; | ||
import { Spin } from "antd"; | ||
import useAppStore from "./store"; | ||
|
||
function AgreementHtml() { | ||
const agreementHtml = useAppStore((state) => state.agreementHtml) | ||
return <div className="column"> | ||
<h2>Preview Ouput</h2> | ||
<p>The result of merging the JSON data with the template. This is AgreementMark converted to HTML.</p> | ||
<div className="agreement" dangerouslySetInnerHTML={{ __html: agreementHtml }}/> | ||
</div>; | ||
function AgreementHtml({ loading }: { loading: any }) { | ||
const agreementHtml = useAppStore((state) => state.agreementHtml); | ||
|
||
return ( | ||
<div | ||
className="column" | ||
style={{ | ||
border: "1px solid #d9d9d9", | ||
borderRadius: "8px", | ||
padding: "16px", | ||
height: "calc(100vh - 64px)", | ||
overflowY: "auto", | ||
display: "flex", | ||
flexDirection: "column", | ||
}} | ||
> | ||
<div style={{ textAlign: "center" }}> | ||
<h2>Preview Output</h2> | ||
<p> | ||
The result of merging the JSON data with the template. This is | ||
AgreementMark converted to HTML. | ||
</p> | ||
</div> | ||
{loading ? ( | ||
<div | ||
style={{ | ||
flex: 1, | ||
display: "flex", | ||
justifyContent: "center", | ||
alignItems: "center", | ||
}} | ||
> | ||
<Spin tip="Loading..." size="large" /> | ||
</div> | ||
) : ( | ||
<div | ||
className="agreement" | ||
dangerouslySetInnerHTML={{ __html: agreementHtml }} | ||
style={{ flex: 1 }} | ||
/> | ||
)} | ||
</div> | ||
); | ||
} | ||
|
||
export default AgreementHtml; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
body, | ||
html { | ||
html, | ||
body { | ||
height: 100vh; | ||
margin: 0; | ||
padding: 0; | ||
} |