-
Notifications
You must be signed in to change notification settings - Fork 180
JSON Editor for Typed json #734
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
8273b75
changes for the new and antd components refactor
diptitiwari2917 f8b74e5
Merge branch 'main' of github.com:Atri-Labs/atrilabs-engine
diptitiwari2917 ad5199b
Added CountDown and Statistics antd component
diptitiwari2917 3139f14
fix: removed comments and linting
diptitiwari2917 4caccff
fix: removed console and linting issues
diptitiwari2917 a14548a
JSON Editor Functionality and implemented in Tree
diptitiwari2917 97bf0f4
WIP: Type changes
diptitiwari2917 dec155e
Merge branch 'main' of github.com:Atri-Labs/atrilabs-engine
diptitiwari2917 408716e
Types changes and new components (Badge, Cascadar, Unorderedlist)
diptitiwari2917 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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
158 changes: 158 additions & 0 deletions
158
packages/custom-props-layer/src/components/commons/Modal.tsx
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,158 @@ | ||
| function Modal(props: any) { | ||
| return ( | ||
| <> | ||
| <style> | ||
| {` .modal-content { | ||
| position: relative; | ||
| background-color: #fefefe; | ||
| margin: auto; | ||
| padding: 0; | ||
| border: 1px solid #888; | ||
| width: 80%; | ||
| box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2),0 6px 20px 0 rgba(0,0,0,0.19); | ||
| animation-name: animatetop; | ||
| animation-duration: 0.4s; | ||
| display: flex; | ||
| flex-direction: column; | ||
| justify-content: space-between; | ||
| } | ||
| .modal-footer { | ||
| padding: 2px 16px; | ||
| background-color: #5cb85c; | ||
| color: white; | ||
| } | ||
| .modal-body {padding: 2px 16px;} | ||
| .modal-header { | ||
| padding: 2px 16px; | ||
| background-color: #5cb85c; | ||
| color: white; | ||
| } | ||
| .close { | ||
| color: #aaa; | ||
| float: right; | ||
| font-size: 28px; | ||
| font-weight: bold; | ||
| } | ||
|
|
||
| .close:hover, | ||
| .close:focus { | ||
| color: black; | ||
| text-decoration: none; | ||
| cursor: pointer; | ||
| } | ||
| body:after { | ||
| position: absolute; | ||
| content: ''; | ||
| left: 0; | ||
| top: 0; | ||
| height: 100vh; | ||
| width: 100vw; | ||
| background: rgba(0,0,0,0.5); | ||
| /* visibility: hidden; */ | ||
| z-index: 0; | ||
| } | ||
| body:after { | ||
| position: absolute; | ||
| content: ''; | ||
| left: 0; | ||
| top: 0; | ||
| height: 100vh; | ||
| width: 100vw; | ||
| background: rgba(0,0,0,0.5); | ||
| z-index: 0; | ||
| } | ||
|
|
||
| .modal-content{ | ||
| position:fixed !important; | ||
| top:50%; | ||
| left:50%; | ||
| transform: translate(-50%, -50%); | ||
| z-index: 1; | ||
| width:800px; | ||
| height:800px; | ||
| border-radius: 5px; | ||
| box-sizing: border-box; | ||
|
|
||
| } | ||
| .modal-header{ | ||
| background-color: transparent; | ||
| padding: 16px; | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: space-between; | ||
| border-bottom:1px solid #dee2e6; | ||
| } | ||
| .modal-footer{ | ||
| background-color: transparent; | ||
| padding-top: 16px; | ||
| border-top: 1px solid #dee2e6 ; | ||
| padding:16px; | ||
| display:flex; | ||
| gap:10px; | ||
| justify-content:end; | ||
| } | ||
| .modal-header h2{ | ||
| color: black; | ||
| margin: 0; | ||
| font-size:20px; | ||
| font-weight:500; | ||
| } | ||
| .modal-body{ | ||
| padding: 0px; | ||
| } | ||
| .modal-content .modal-body .cm-theme-light{ | ||
| height: 660px; | ||
| overflow-y: scroll; | ||
| } | ||
| .modal-content .error .cm-theme-light { | ||
| height: 620px ! important; | ||
| overflow-y: scroll; | ||
| } | ||
| .modal-footer .disabled{ | ||
| background-color:#efefef !important; | ||
| cursor: not-allowed; | ||
| color: gray !important; | ||
| border: none; | ||
| height: 38px; | ||
| border-radius: 5px; | ||
| font-size: 16px; | ||
| } | ||
| .modal-footer button:first-child{ | ||
| background: #007bff; | ||
| color: #ffffff; | ||
| border: none; | ||
| height: 38px; | ||
| border-radius: 5px; | ||
| font-size: 16px; | ||
| } | ||
| .modal-footer button:last-child{ | ||
| background: #6c757d; | ||
| color: #ffffff; | ||
| border: none; | ||
| width: 75px; | ||
| height: 38px; | ||
| border-radius: 5px; | ||
| font-size: 16px; | ||
| } | ||
| `} | ||
| </style> | ||
|
|
||
| {props.showModal && ( | ||
| <div className="modal-content"> | ||
| <div className="modal-header"> | ||
| <h2>{props.title}</h2> | ||
| <span className="close" onClick={() => props.setShowModal(false)}> | ||
| × | ||
| </span> | ||
| </div> | ||
| <div className="modal-body" >{props.children}</div> | ||
| <div className="modal-footer"> | ||
| {props.footer} | ||
| </div> | ||
| </div> | ||
| )} | ||
| </> | ||
| ); | ||
| } | ||
|
|
||
| export default Modal; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.