mirror of
https://github.com/oceanprotocol/docs.git
synced 2024-11-26 19:49:26 +01:00
more styling, output responses
This commit is contained in:
parent
25b6e388bb
commit
d05423d4b5
@ -29,9 +29,23 @@ const Method = ({ keyName, value }) => (
|
|||||||
{keyName}
|
{keyName}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
<p>{value['summary']}</p>
|
<p>{value.summary}</p>
|
||||||
|
|
||||||
{value['description'] && <p>{value['description']}</p>}
|
{value.description && <p>{value.description}</p>}
|
||||||
|
|
||||||
|
{value.consumes &&
|
||||||
|
value.consumes.map((item, i) => (
|
||||||
|
<div key={i}>
|
||||||
|
<code>{item}</code>
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
|
|
||||||
|
<h4 className={styles.subHeading}>Responses</h4>
|
||||||
|
{Object.entries(value.responses).map(([key, value]) => (
|
||||||
|
<div key={key}>
|
||||||
|
<code>{key}</code> {value.description}
|
||||||
|
</div>
|
||||||
|
))}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,13 +4,20 @@
|
|||||||
font-size: $font-size-h2;
|
font-size: $font-size-h2;
|
||||||
border-bottom: 1px solid $brand-grey-lighter;
|
border-bottom: 1px solid $brand-grey-lighter;
|
||||||
padding-bottom: $spacer / 2;
|
padding-bottom: $spacer / 2;
|
||||||
margin-bottom: $spacer / 2;
|
margin-top: $spacer * 2;
|
||||||
|
margin-bottom: $spacer;
|
||||||
|
|
||||||
|
code {
|
||||||
|
// stylelint-disable-next-line
|
||||||
|
background: none !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.pathMethod {
|
.pathMethod {
|
||||||
font-size: $font-size-base;
|
font-size: $font-size-base;
|
||||||
font-family: $font-family-monospace;
|
font-family: $font-family-monospace;
|
||||||
margin-bottom: $spacer / 4;
|
margin-bottom: $spacer / 4;
|
||||||
|
margin-top: 0;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
padding: $spacer / 8 $spacer / 4;
|
padding: $spacer / 8 $spacer / 4;
|
||||||
border-radius: $border-radius;
|
border-radius: $border-radius;
|
||||||
@ -33,6 +40,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.method {
|
.method {
|
||||||
padding-top: $spacer / 4;
|
padding: $spacer / 2;
|
||||||
padding-bottom: $spacer / 4;
|
border: 1px solid $brand-grey-lighter;
|
||||||
|
margin-bottom: $spacer;
|
||||||
|
border-radius: $border-radius;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subHeading {
|
||||||
|
font-size: $font-size-base;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user