Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Th2-4031] Added ability to resize modal forms #82

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "th2-schema-editor",
"version": "1.1.20",
"version": "1.1.21",
"description": "",
"main": "index.tsx",
"private": true,
Expand Down
1 change: 1 addition & 0 deletions src/components/box/BoxSettings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,7 @@ const BoxSettings = ({ box, onClose, setEditablePin, setEditableDictionary }: Bo
style={{
maxHeight: 500,
overflow: 'auto',
flexGrow: 0,
}}>
{isUpdated && (
<div className='modal__update'>
Expand Down
3 changes: 0 additions & 3 deletions src/components/dictionary/DictionaryModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,6 @@ const DictionaryModal = ({ dictionary, onClose }: DictionaryModalProps) => {
onDragEnter={() => setIsFileDragging(true)}
onDragExit={() => setIsFileDragging(false)}
ref={modalRef}
style={{
width: '500px',
}}
className='modal'>
<div className='modal__header'>
<h3 className='modal__header-title'>
Expand Down
2 changes: 1 addition & 1 deletion src/components/util/ConfigEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const ConfigEditor = ({ configInput }: ConfigEditor) => {
{configInput.label}
</label>
<Editor
height={300}
height='90%'
width='auto'
language={defineFileFormat(configInput.value)}
value={configInput.value}
Expand Down
18 changes: 16 additions & 2 deletions src/styles/modal.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
@import './common/vars';

.modal {
width: 360px;
resize: both;
overflow: auto;
display: flex;
justify-content: stretch;
flex-direction: column;
min-width: 300px;
min-height: 350px;
width: auto;
height: auto;
position: absolute;
top: 50%;
left: 50%;
Expand Down Expand Up @@ -51,6 +59,10 @@
&__content {
padding: 10px 15px 0 15px;
overflow: visible;
flex-grow: 10;
display: flex;
flex-direction: column;
min-height: 55px;

&-switcher {
display: flex;
Expand Down Expand Up @@ -144,6 +156,7 @@
}

&__buttons {
justify-self: end;
display: flex;
gap: 15px;
margin: 20px 15px 0 15px;
Expand Down Expand Up @@ -258,10 +271,11 @@
@include scrollbar;

min-height: 150px;
max-height: 350px;
max-height: 700px;
overflow-y: scroll;
padding: 2px 15px 5px 15px;
margin-top: 10px;
flex-grow: 10;

&.long {
max-height: calc(100vh - 200px);
Expand Down
8 changes: 7 additions & 1 deletion src/styles/root.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ body {
}

&-wrapper {
height: auto;
width: auto;
display: flex;
flex-direction: column;
margin-bottom: 10px;
Expand All @@ -128,9 +130,13 @@ body {
.textarea {
@include scrollbar;

height: 300px;
height: 100%;
min-height: 100px;
resize: none;
padding: 0;
&-wrapper{
height: 85%;
}
}

.decision__modal {
Expand Down