tweak design

This commit is contained in:
Aakansha Doshi 2023-08-25 15:44:22 +05:30
parent 41a0258fe1
commit d1266280cb
2 changed files with 62 additions and 47 deletions

View File

@ -1,6 +1,6 @@
@import "../css/variables.module"; @import "../css/variables.module";
.excalidraw {
.mermaid-to-excalidraw-wrapper { .mermaid-to-excalidraw-wrapper {
display: flex; display: flex;
width: 100%; width: 100%;
justify-content: space-between; justify-content: space-between;
@ -19,6 +19,9 @@
width: 20rem; width: 20rem;
height: 22rem; height: 22rem;
resize: none; resize: none;
border: 1px solid var(--ImageExportModal-preview-border);
border-radius: 8px;
padding: 1rem;
} }
} }
@ -26,15 +29,15 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
padding: 1rem; padding: 0.85rem;
width: 20rem; width: 20rem;
height: 23.5rem; height: 22rem;
background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==") background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAMUlEQVQ4T2NkYGAQYcAP3uCTZhw1gGGYhAGBZIA/nYDCgBDAm9BGDWAAJyRCgLaBCAAgXwixzAS0pgAAAABJRU5ErkJggg==")
left center; left center;
border: 1px solid var(--ImageExportModal-preview-border); border: 1px solid var(--ImageExportModal-preview-border);
border-radius: 12px; border-radius: 8px;
} }
&-preview-insert.excalidraw-button { &-preview-insert.excalidraw-button {
@ -44,7 +47,7 @@
width: 5rem; width: 5rem;
background-color: var(--color-primary); background-color: var(--color-primary);
&:hover { &:hover {
background-color: var(--color-primary-darke); background-color: var(--color-primary-darker);
} }
&:active { &:active {
background-color: var(--color-primary-darkest); background-color: var(--color-primary-darkest);
@ -52,4 +55,5 @@
color: $oc-white; color: $oc-white;
} }
}
} }

View File

@ -151,14 +151,25 @@ const MermaidToExcalidraw = ({
return ( return (
<Dialog onCloseRequest={onClose} title="Mermaid to Excalidraw"> <Dialog onCloseRequest={onClose} title="Mermaid to Excalidraw">
<div className="mermaid-to-excalidraw-wrapper"> <div className="mermaid-to-excalidraw-wrapper">
<div className="mermaid-to-excalidraw-wrapper-text"> <div
className="mermaid-to-excalidraw-wrapper-text"
style={{ display: "flex", flexDirection: "column" }}
>
<label>Describe</label> <label>Describe</label>
<textarea <textarea
style={{
padding: "0.85rem",
borderRadius: "8px",
border: "1px solid var(--ImageExportModal-preview-border)",
}}
onChange={(event) => setText(event.target.value)} onChange={(event) => setText(event.target.value)}
value={text} value={text}
/> />
</div> </div>
<div className="mermaid-to-excalidraw-wrapper-preview"> <div
className="mermaid-to-excalidraw-wrapper-preview"
style={{ display: "flex", flexDirection: "column" }}
>
<label>Preview</label> <label>Preview</label>
<div <div
className="mermaid-to-excalidraw-wrapper-preview-canvas" className="mermaid-to-excalidraw-wrapper-preview-canvas"