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

fix(docs): act-1451 - fixes for drawer position #1373

Merged
merged 1 commit into from
Jul 1, 2024
Merged
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
19 changes: 13 additions & 6 deletions src/components/ParserOpenRPC/ModalDrawer/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
.modalContainer {
max-width: 792px;
width: 100%;
border: 1px solid #848C96;
border-radius: 8px 8px 0 0;
position: fixed;
position: absolute;
z-index: 10;
top: 100%;
left: 50%;
left: 15px;
right: 15px;
min-height: 512px;
opacity: 0;
transform: translate(-50%, 100%);
transform: translate(0, 100%);
transition-property: 'transform', 'opacity';
transition-duration: .4s;
transition-timing-function: ease;
Expand All @@ -20,7 +19,7 @@

.modalContainerOpen {
opacity: 1;
transform: translate(-50%, -100%);
transform: translate(0, -100%);
}

.modalHeader {
Expand Down Expand Up @@ -56,3 +55,11 @@
height: 394px;
overflow-y: auto;
}

@media (width <= 1200px) {
.modalContainer {
position: fixed;
left: 0;
right: 0;
}
}
20 changes: 14 additions & 6 deletions src/components/ParserOpenRPC/global.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,20 @@
.rowWrap {
display: flex;
flex-wrap: wrap;
padding: 0 30px;
padding: 0 30px 0 0;
}

.colLeft {
position: relative;
width: 65%;
padding-right: 23px;
border-right: 1px solid #444950;
overflow: hidden;
}

.colContentWrap {
height: calc(100vh - 84px);
padding: 0 30px;
overflow-y: auto;
}

.colRight {
Expand All @@ -79,10 +86,11 @@
width: 100%;
padding: 0;
}
}

@media (width <= 1024px) {
.colContentWrap {
height: auto;
padding: 0;
}
.rowWrap {
padding: 0;
}
}
}
20 changes: 11 additions & 9 deletions src/components/ParserOpenRPC/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,17 @@ export default function ParserOpenRPC({ network, method }: ParserProps) {
return (
<div className={global.rowWrap}>
<div className={global.colLeft}>
<DetailsBox
method={method}
description={currentMethodData.description}
params={currentMethodData.params}
components={currentMethodData.components.schemas}
result={currentMethodData.result}
tags={currentMethodData.tags}
/>
<ErrorsBox errors={currentMethodData.errors} />
<div className={global.colContentWrap}>
<DetailsBox
method={method}
description={currentMethodData.description}
params={currentMethodData.params}
components={currentMethodData.components.schemas}
result={currentMethodData.result}
tags={currentMethodData.tags}
/>
<ErrorsBox errors={currentMethodData.errors} />
</div>
<ModalDrawer
title="Customize request"
isOpen={isModalOpen}
Expand Down
5 changes: 5 additions & 0 deletions src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -291,4 +291,9 @@ html[data-theme="light"] .api-card:hover {

.transition-300 {
transition: all 0.3s;
}

fieldset {
border: 0;
padding: 0;
}
2 changes: 1 addition & 1 deletion wallet/reference/new-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ sidebar_class_name: "hidden"
import ParserOpenRPC from "@site/src/components/ParserOpenRPC";
import { NETWORK_NAMES } from "@site/src/plugins/plugin-json-rpc";

<ParserOpenRPC network={NETWORK_NAMES.metamask} method="eth_subscribe" />
<ParserOpenRPC network={NETWORK_NAMES.metamask} method="eth_call" />